Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a dataset full of "vendor IDs" that can be added and expired in different markets. I want to be able to track if a Vendor ID has been expired in all instances so with the screenshot below, the count would be zero because not all expiration dates are populated. If they were, I would want the count to be one. Is there a way to do this with DAX measures?
Solved! Go to Solution.
Hmm, assuming that we have vendor_id in the visualization:
Count Measure =
VAR __Count1 = COUNTROWS('Table')
VAR __Count2= COUNTROWS(FILTER('Table',NOT(ISBLANK('Table'[expiration_date]))))
RETURN
IF(__Count1 = __Count2,1,0)
For all vendor ID's you might have to do something like:
Count Measure =
VAR __Table =
SUMMARIZE(
'Table',
[vendor_id],
"__Count1" = COUNTROWS('Table'),
"__Count2" = COUNTROWS(FILTER('Table',NOT(ISBLANK('Table'[expiration_date]))))
)
RETURN
COUNTROWS(FILTER(__Table,[__Count1] = [__Count2]))
Hmm, assuming that we have vendor_id in the visualization:
Count Measure =
VAR __Count1 = COUNTROWS('Table')
VAR __Count2= COUNTROWS(FILTER('Table',NOT(ISBLANK('Table'[expiration_date]))))
RETURN
IF(__Count1 = __Count2,1,0)
For all vendor ID's you might have to do something like:
Count Measure =
VAR __Table =
SUMMARIZE(
'Table',
[vendor_id],
"__Count1" = COUNTROWS('Table'),
"__Count2" = COUNTROWS(FILTER('Table',NOT(ISBLANK('Table'[expiration_date]))))
)
RETURN
COUNTROWS(FILTER(__Table,[__Count1] = [__Count2]))
So that count is working for the complete total count, but doesn't work when monthly/daily filters are applied. I've been trying to calculate a running total of all vendors by day:
Yes! This is pulling in the correct number I'm looking for.
Thanks so much!
@Anonymous , Screenshot is missing but seems like a case of all except
Refer
https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
89 | |
68 | |
61 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |