The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
In a card visual, I have used a measure which takes the distinct count of product no. Now in additional to that, I have to include a logic to get the distinct count of product no where Actuals + Forecast > 0. In the below example, the distinct count of product no where Actuals + Forecast > 0 is 4. This logic I need to achieve in a Card visual. Can anybody help me with the logic here?
Product No | Actuals | Forecast |
1 | 0 | 30 |
2 | 0 | 0 |
3 | 65 | 100 |
4 | 50 | 0 |
5 | 0 | 0 |
6 | 100 | 150 |
Thanks in advance!!
Solved! Go to Solution.
HI @MadhumithaV_26,
I'd like to suggest you extract the 'product no' field values based on filter conditions, then you can use countrows function with these field values to get the count.
formula =
CALCULATE (
COUNTROWS ( VALUES ( Table[Product No] ) ),
FILTER ( ALLSELECTED ( Table ), [Actual] + [Forecast] > 0 )
)
Regards,
Xiaoxin Sheng
HI @MadhumithaV_26,
I'd like to suggest you extract the 'product no' field values based on filter conditions, then you can use countrows function with these field values to get the count.
formula =
CALCULATE (
COUNTROWS ( VALUES ( Table[Product No] ) ),
FILTER ( ALLSELECTED ( Table ), [Actual] + [Forecast] > 0 )
)
Regards,
Xiaoxin Sheng
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |