Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I Have the report with the many visuals and the sample data is attached below.
Here we have one file and it is loaded in to the table from excel file. everyday it is uploaded by different times. for each file we are giving batch id.
Batch id | Date | Table Name | Successful records |
1 | 3/12/2019 | Landing Table | 10 |
2 | 3/12/2019 | Landing Table | 5 |
3 | 3/12/2019 | Landing Table | 6 |
1 | 4/12/2019 | Landing Table | 9 |
2 | 4/12/2019 | Landing Table | 10 |
1 | 5/12/2019 | Landing Table | 6 |
2 | 5/12/2019 | Landing Table | 4 |
3 | 5/12/2019 | Landing Table | 2 |
Now we are reporting this any different visuals. with the date filter. Now the user want to see the latest data for the current date.That is only the below data.
3 | 5/12/2019 | Landing Table | 2 |
But the user also should have the flexibility to see the other date data by using filter.
Please help me on this issue.
Solved! Go to Solution.
Hi @Anonymous ,
Firstly, we need to add a indexcolumn in Power Query Editor to identify the latest rows of same day.
Then we can create a measure and use it in Visual Filter to meet your requirement:
IsLatestRecordOfMaxDay =
VAR maxDate =
CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )
RETURN
IF (
SELECTEDVALUE ( 'Table'[Date] ) = maxDate
&& SELECTEDVALUE ( 'Table'[Index] )
= CALCULATE (
MAX ( 'Table'[Index] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = maxDate )
),
1,
-1
)
The date does not nessary to sort by increament, we create index column to get the latest record after filter the table with the latest day.
If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.
Best regards,
Hi @Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
@Anonymous ,
Use the slicer with Relative option. Screen shot is attached.
Don't forget to hit Thumbs up and accept this as a solution if you find it helpful!
Hi Tahreem24,
The solution that you provided is not working for me. Because here i have tye dependency with Batchid also.
For the current date the latest batchid file need to be display in the reports but in the filter we should have all the values to select.
Hi @Anonymous ,
Firstly, we need to add a indexcolumn in Power Query Editor to identify the latest rows of same day.
Then we can create a measure and use it in Visual Filter to meet your requirement:
IsLatestRecordOfMaxDay =
VAR maxDate =
CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )
RETURN
IF (
SELECTEDVALUE ( 'Table'[Date] ) = maxDate
&& SELECTEDVALUE ( 'Table'[Index] )
= CALCULATE (
MAX ( 'Table'[Index] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = maxDate )
),
1,
-1
)
The date does not nessary to sort by increament, we create index column to get the latest record after filter the table with the latest day.
If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.
Best regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |