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 Learner_SG ,
Dates and hours are unique in sample file. I can help if you send me some data like in your first post 🙂
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.
- coskuersanli4 years agoResolver III
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 =
RANKX(ALLEXCEPT('Sheet1',Sheet1[Date]),SUM(Sheet1[WC Water Consumption(mL)]),,DESC,Skip)- Learner_SG4 years agoHelper IV
- coskuersanli4 years agoResolver III