The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Experts,
I have a requirement where we are using a matrix for showing data and need to build a button(Last 5 days date) and when we click on that it should show only the last 5 days' data in the matrix,
For particular requirements on how to build a measure, Need your input and suggestions
Thanks in advance,
Regards,
Hk
Solved! Go to Solution.
Hi @kousar99 ,
1-You can create a flag column. If gives 1 value (or the text "Last 5 days") to the records that are last 5 days (Today and 4 days before). Then you can put this column as a slicer which contains last 5 days.
2-In terms of measure, You can do this:
Last5DaysMEasure =
CALCULATE (
[YourMeasure],
FILTER (
ALL ( 'DateTable' ),
'DateTable'[Date]
>= TODAY () - 4
&& 'DateTable'[Date] <= TODAY ()
)
)
If this answer solves your problem, give it a thumbs up and mark it as an accepted solution so the others would find what they need easier.
Regards,
Loran
Hi @kousar99 ,
1-You can create a flag column. If gives 1 value (or the text "Last 5 days") to the records that are last 5 days (Today and 4 days before). Then you can put this column as a slicer which contains last 5 days.
2-In terms of measure, You can do this:
Last5DaysMEasure =
CALCULATE (
[YourMeasure],
FILTER (
ALL ( 'DateTable' ),
'DateTable'[Date]
>= TODAY () - 4
&& 'DateTable'[Date] <= TODAY ()
)
)
If this answer solves your problem, give it a thumbs up and mark it as an accepted solution so the others would find what they need easier.
Regards,
Loran
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |