Forum Discussion
Power BI DAX
- 4 years ago
Hi Learner_SG ,
I got it. Here's my solution.
1.Create a check measure.
Check = IF(MAX('Sheet4'[Parsed_Date])=TODAY()-7,1)Put the measure in the visual filter and let the value is 1.
2. Create a rank measure.
Rank = RANKX ( FILTER ( ALL ( 'Sheet4' ), 'Sheet4'[Parsed_Date] = TODAY () - 7 ), CALCULATE ( SUM ( 'Sheet4'[WC Water Consumption(mL)] ) ), , DESC, DENSE )Put the measure in the visual filter and let the value <=4, get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi coskuersanli , Because the data is captured on a real time basis the difference between the times are very close. I have attached another file with more data .
https://drive.google.com/file/d/1O8ohw7KfZ6fealUfS0iyeDd4SLnsSTBO/view?usp=sharing.
what I need to come up , is based on the WC water consumption data I need to get the highest 4 times( the hours) on each day and later I need to display it in a table. Appreciate the help.tks.
Hi Learner_SG ,
I've tried below one. But we need to change data type of WC Water Consumption to number. Can you change data type and share with me if it doesn't work, please?
rank =
- Learner_SG4 years agoHelper IV
- coskuersanli4 years agoResolver III
- Learner_SG4 years agoHelper IV
Thanks coskuersanli , when I try to display the measure, it shows only rank1 for every row.Is it that I am getting wrong any where?
Because , I need to select the highest 4 (hours) of previous 7th day to display it as today's cleaning time.