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!
I have different categories, labeled as 'PICKER BEHAVIOUR CLASS', these categories have a group of IDs, and there's a quantity of IDs that match these categories every week. For Example, the IDs 1, 2 and 3 in February 7th fell into this category, then the next week, February 14th, the IDs 1 and 2 fell into this category again. What I want to know is if there's a way I can count how many IDs repeated category. In this case, for the week of February 14th, the result should be 2.
I expect something like these to be the result.
Can anybody please help me?
Best Regards
Solved! Go to Solution.
Hi @Anonymous ,
Please refer the formula.
count_ =
VAR tmp =
CALCULATETABLE (
VALUES ( 'Table'[id] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[category] = SELECTEDVALUE ( 'Table'[category] )
&& 'Table'[week]
= SELECTEDVALUE ( 'Table'[week] ) - 1
)
)
RETURN
CALCULATE (
DISTINCTCOUNT ( 'Table'[id] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[week], 'Table'[category] ),
'Table'[id] IN tmp
)
)
Best Regards,
Jay
Hi @Anonymous ,
Please refer the formula.
count_ =
VAR tmp =
CALCULATETABLE (
VALUES ( 'Table'[id] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[category] = SELECTEDVALUE ( 'Table'[category] )
&& 'Table'[week]
= SELECTEDVALUE ( 'Table'[week] ) - 1
)
)
RETURN
CALCULATE (
DISTINCTCOUNT ( 'Table'[id] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[week], 'Table'[category] ),
'Table'[id] IN tmp
)
)
Best Regards,
Jay
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
91 | |
89 | |
78 | |
69 | |
69 |
User | Count |
---|---|
222 | |
128 | |
117 | |
82 | |
77 |