Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I
I am having problem with the above coding.
As shown above, i am having issue in fixing the Total value of the "Noofdays".
It is supposed to display 19 instead 57.
Basically, I trying to to calculate the no of days whereby ES 2 is showing positive value.
Does anyone know what went wrong in my coding?
Solved! Go to Solution.
Hi,
This measure works
=COUNTROWS(FILTER(SUMMARIZE(VALUES(Resource[Date]),Resource[Date],"ABCD",[ES 2]),[ABCD]>0))
Hope this helps.
Hi @stoneage
Try this one:
Measure 3 = CALCULATE(COUNTROWS('Resource'),FILTER('Resource',[ES 2]>0))
Thanks for your reply but issue the same. The filter does not work on the measure data.
Hi @stoneage
Would you mind sharing your dummy pbix? I'd like to do further research and provide a solution.
Sorry for the late reply.
Yes, I can provide the dummy file.
May I know how I can upload the pibx file?
Hi @stoneage
You can upload it to dropbox/onedrive and share the link here.
Hi,
This measure works
=COUNTROWS(FILTER(SUMMARIZE(VALUES(Resource[Date]),Resource[Date],"ABCD",[ES 2]),[ABCD]>0))
Hope this helps.
You are welcome.
@stoneage Why is your formula so complicated? Why can't you just use
CALCULATE(COUNTROWS(Resource), [ES 2] > 0)
?
@JirkaZ Thanks for the reply.
Have done that as it will give error stating the "CALCULATE has been used in a True/Flase expression that is used as a table filter expression. This is not allowed".
I believed it is due to "ES 2" data is a measure value.
Additional information, only the "date" is raw data in column value while the "ES 2" and " Noofday" are calculated measure values.
The issue is that the rowcount can only accept table data but "ES 2" is measure data.
Hence, trying to create a virtual table using summerize function to count it. But still cannot work.
User | Count |
---|---|
140 | |
113 | |
104 | |
74 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |