The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Please help me some Power BI Experts, I have problem like the first picture when I extracted data. My table with the ID repeated the values each month
Can anyone help me to write a DAX formula to Sum the distinct value group by ID and each Month like following table. Thank you very much.
Solved! Go to Solution.
Hi,
I am not sure if I understood your data model correctly without seeing the actual one, but please try the below measure.
Distinct value sum measure: =
SUMX (
ADDCOLUMNS (
SUMMARIZE ( 'table name', 'table name'[MONTH], 'table name'[ID] ),
"@distinctvalue", CALCULATE ( MAX ( 'table name'[VALUE] ) )
),
[@distinctvalue]
)
Hi,
I am not sure if I understood your data model correctly without seeing the actual one, but please try the below measure.
Distinct value sum measure: =
SUMX (
ADDCOLUMNS (
SUMMARIZE ( 'table name', 'table name'[MONTH], 'table name'[ID] ),
"@distinctvalue", CALCULATE ( MAX ( 'table name'[VALUE] ) )
),
[@distinctvalue]
)
It's really help me. Thank you so much.
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |