Forum Discussion
Dynamic Measure calculation
- Anonymous2 years ago
lbendlin , thanks for your concern about this case. I tried to create a sample data myself based on the user's requirement and implemented the result. Please check if there is anything that can be improved. Here is my solution:
Hi NMDGA ,I created some data:
Here are the steps you can follow:
When the same columns are used in the slicer and the table visual, then the table visual will change with the values selected by the slicer, and we can create a table of dates with no relationship to work with measure
1. Create calculated table.
Date = CALENDAR( DATE(2024,7,1), DATE(2024,10,31))2. Create measure.
Flag = var _select=SELECTEDVALUE('Date'[Date]) return IF( MAX('Table'[report date])=_select || AND( MAX('Table'[report date])<_select,MAX('Table'[activeflag])="Y"),1,0)3. Place [Flag]in Filters, set is=1, apply filter.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523