The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Everyone,
I have used Subtotal from Distinctcount in the table and the result is incorrect. I used 2 measures for the calculation below.
visit(cal) = DISTINCTCOUNT(Spending[date])
Visit = VAR _table = SUMMARIZE(Spending, Spending[member_number], "distinctcount", DISTINCTCOUNT(Spending[date]))
RETURN
SUMX(_table, [visit(cal)])
The result of subtotal should be (14+24+46) = 84 but in the table shown 83. Please help me to fix it.
Solved! Go to Solution.
Hi @runatthakorn ,
Refer the below ,according your provided,similar question:
2+2 ,get total:3
You need to create a new measure:
test = if(HASONEVALUE(Spending[branch_name]),[visit(cal)],SUMX(DISTINCT(Spending[branch_name]),[visit(cal)]))
Output:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi,
Share the link from where i can download your PBI file.
Hi @runatthakorn ,
Refer the below ,according your provided,similar question:
2+2 ,get total:3
You need to create a new measure:
test = if(HASONEVALUE(Spending[branch_name]),[visit(cal)],SUMX(DISTINCT(Spending[branch_name]),[visit(cal)]))
Output:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
you may have a similar id in rows between two categories, So as your formula is distinct count it counts it only once.
can we have a your data set to verify ?
Hi FerhatLyes,
Thank you for your reply and for the sample of data set as below.
I want to use distinct count of date group by member_number and group by branch_name.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
141 | |
109 | |
108 | |
76 | |
63 |
User | Count |
---|---|
270 | |
129 | |
123 | |
100 | |
92 |