Forum Discussion
Count calculation result
- 3 years ago
Hi,
Try this measure
Measure = COUNTROWS(FILTER(VALUES(Calendrier[Date]),[Solde]==0))
or
Measure = COUNTROWS(FILTER(VALUES(Calendrier[Date]),[Solde]=0&&[Solde]<>blank()))
Hi,
Drag this measure to a card visual
Measure = countrows(FILTER(VALUES(Allid[id]),[Sum3]=0))
Ensure that you create a seperate table called Allid which has all unique ID's. Create a relationship (Many to One and Single) of both your data tables to the Allid table.
Hope this helps.
Thanks, we're close to the result !
With this measure :
Which is close to correct.
In my model, the measure's result I try to test is based on a calendar table (need to count the number of days where "solde" = 0). And in this exemple, from range 03/01 to 08/01, there are 6 days. In this filtered selection, the "solde"= 0 is checked the 06/01. But there are no data the 04/01, so, since the day exist in my calendar, I guess the measure consider the "solde"=0 on this particuliar day. And finally count 2 instead of 1.
What condition / filter can I add to ignore days where there are no datas ?
- Ashish_Mathur3 years agoSuper User
Hi,
Try this measure
Measure = COUNTROWS(FILTER(VALUES(Calendrier[Date]),[Solde]==0))
or
Measure = COUNTROWS(FILTER(VALUES(Calendrier[Date]),[Solde]=0&&[Solde]<>blank()))
- Thomas_S3 years agoFrequent Visitor
The first one works perfectly ! Thank you !
(the second measure return "empty" on the card)
Last question, for my understanding, why is it working with a double "=" sign in the measure? What does it mean ?
- Ashish_Mathur3 years agoSuper User
You are welcome. Read here - DAX operators - DAX | Microsoft Learn