Forum Discussion
Converting static to Dynamic Measure
- 4 years ago
Hi Anonymous
Please try something likeMeasure1 = VAR LastDateWithData = CALCULATE ( MAX ( MASTER[Date] ), REMOVEFILTERS () ) VAR LastVerion = CALCULATE ( MAX ( MASTER[Version] ), MASTER[Date] = LastDateWithData, REMOVEFILTERS () ) RETURN CALCULATE ( SUM ( Sales[Values] ) / 1000, MASTER[Version] = LastVerion, ALL ( MASTER[Comparison] ) )
Hai tamerj1
This is the data model master table contains all dimension values and the sales table is a fact table
This is the fact table here I will append every version of data in this particular table, I have a data of V5- May -2021 to v4- April-2022
After I had created a version flag so based on this report will understand the max of version
And user want to see the report based on the latest version of data and they want to compare it with previous ones
Requirment is , After appedning every version table instead of write a static latest version(like which i marked in red)
I want to add dynamic latest version. And report should automatically update with latest version.Even the new version of table appending
Hope it clear please reach out still you have any doubt
Good morning Anonymous
this is exactly what I was trying to do. Her is the explanation of my idea and let me know if anything does not seem right.
The latest verion corresponds to the latest date available in the MASTER table. I started with calculating the last date avialable in the master table by removing all filters.
using this date I calculated the corresponding version and again by removing all filters.
this should give me the last version which I can refer to in your measure. Not sure wht goes wrong? Please correct me if I missed something.