The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
Here is a measure SUM (0+0+0+0.6+0.6+0.6...) divided by COUNT of dates.
The question is how to exclude those dates when summary equals 0.00 from this calculations?
Currently it calculates: 4.2 / 12 = 0.35
I need it to calculate: 4.2 / 7 = 0.6
the reason 0.00 is showing for some dates is because in the data there is 0.6 but later on there was another data added with -0.6 for those dates. Hence below we see the summary.
Thank you!
Solved! Go to Solution.
Thank you all!
I could not make it work in DAX. I amended it at the data level: grouped and filtered out zero. That worked
Thank you all!
I could not make it work in DAX. I amended it at the data level: grouped and filtered out zero. That worked
Hi,
What about creating several measures:
1 measure to calculate the sum for the data, such as
Total Data:= SUM(table[Data])
1 measure to count the number of total greater than 0, such as
Not Null Count := COUNTX('Calendar'[Date], [Total Data] >0)
1 measures to do the division:
Average Data:= DIVIDE([Total Data], [Not Null Count])
I think that should work if my assumption are correct:
yes, but sadly it doesn't work, because in the data it is 0.6-0.6 and in the report it's displayed as 0.00
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |