Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I need to calculate how many stores there are in total only if there are any units. I need to do it in a measure.
The stores with a value is 28 and the count all measure shows 35
Solved! Go to Solution.
Hi, @krzysztof
Based on your description, I created data to reproduce your scenario.
You may create a measure as follows.
Count All =
COUNTROWS(
FILTER(
ALL('DWH Dimlocalization'),
'DWH Dimlocalization'[StoreID]<>BLANK()&&
'DWH Dimlocalization'[Units]<>BLANK()
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @krzysztof
Based on your description, I created data to reproduce your scenario.
You may create a measure as follows.
Count All =
COUNTROWS(
FILTER(
ALL('DWH Dimlocalization'),
'DWH Dimlocalization'[StoreID]<>BLANK()&&
'DWH Dimlocalization'[Units]<>BLANK()
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try
sumx(summarize((Table),Table[Store],"_sum",sum(table[unit])),If([_sum]>0,1,0))
//OR
sumx(summarize(all(Table),Table[Store],"_sum",sum(table[unit])),If([_sum]>0,1,0))
Appreciate your Kudos.
@amitchandak @Mariusz @Anonymous Unfortunately, your proposals do not work. Below in the picture I present what I mean
So, you're asking for a calculated column, not a measure, right?
Hi @krzysztof
Try this
Measure =
CALCULATE(
DISTINCTCOUNT( 'DWH DimLocalization'[StoreID] );
'DWH DimLocalization'[units] <> BLANK()
)
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
105 | |
99 | |
98 | |
38 | |
37 |
User | Count |
---|---|
152 | |
120 | |
73 | |
72 | |
63 |