Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi everyone,
I am new Power Bi learner,
I am facing an issue while creating a measure such that, I am having table - "Data Dump"
For countries IN, KR, CN, the meaure should reflect their respective count of docs
and for countries TW, SG, TH, measure should reflect there respective distinct count of docs.
My Effort:
DocCount = CALCULATE(IF('Data Dump'[Country] = "IN" || "KR" || "CN", COUNT('Data Dump'[Doc]), DISTINCTCOUNT('Data Dump'[Doc]))
Solved! Go to Solution.
Try this one:
DocCount =
IF (
MAX('Data Dump'[Country]) IN { "IN", "KR", "CN" },
COUNT ( 'Data Dump'[Doc] ),
DISTINCTCOUNT ( 'Data Dump'[Doc] )
)
Pbix attached,
Try this one:
DocCount =
IF (
MAX('Data Dump'[Country]) IN { "IN", "KR", "CN" },
COUNT ( 'Data Dump'[Doc] ),
DISTINCTCOUNT ( 'Data Dump'[Doc] )
)
Pbix attached,
That's to specify the current value in the column.
@CrazyExcelor , Try like
DocCount = CALCULATE(IF('Data Dump'[Country] in { "IN" , "KR" , "CN"}, COUNT('Data Dump'[Sales Document]), DISTINCTCOUNT('Data Dump'[Sales Document])))
Issue I am facing is, IF is not taking non measure column as a value .. it's not detecting 'Data Dump'[Country]
Try this.
DocCount =
IF (
'Data Dump'[Country] IN { "IN", "KR", "CN" },
COUNT ( 'Data Dump'[Sales Document] ),
DISTINCTCOUNT ( 'Data Dump'[Sales Document] )
)
Issue I am facing is, IF is not taking non measure column as a value .. it's not detecting 'Data Dump'[Country]
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
83 | |
64 | |
60 | |
55 |
User | Count |
---|---|
183 | |
111 | |
105 | |
77 | |
70 |