select multiple columns but distinct on one column code example
Example 1: mysql unique two columns
CREATE TABLE IF NOT EXISTS cliente (
id bigint primary key auto_increment,
nome varchar(100) not null,
email varchar(100) not null unique,
senha varchar(255) not null,
documento varchar(50) not null unique,
dataCadastro date not null
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
Example 2: dax count distinct based on 2 columns
Measure1 = COUNTROWS(GROUPBY(User,User[FNAME],User[Card ID],User[Health ID],User[Gender]))
Measure2 = COUNTROWS(FILTER(GROUPBY(User,User[FNAME],User[Card ID],User[Health ID],User[Gender]),User[Gender]="M"))