Forum Discussion
Query on slicer
- Anonymous2 years ago
Hi PAVITHRA_R_G ,
Here are the steps you can follow:
1. Create calculated table.
Date = CALENDAR( DATE(2023,1,1), DATE(2024,12,31))2. Enter data – create a group table.
3. Create measure.
Measure = var _mindate=MINX(ALLSELECTED('Date'),'Date'[Date]) var _maxdate=MAXX(ALLSELECTED('Date'),'Date'[Date]) var _column= SELECTCOLUMNS(FILTER(ALL('Date'),'Date'[Date]>=_mindate&&'Date'[Date]<=_maxdate),"test",[Date]) return SWITCH( TRUE(), MAX('Table'[Activated from]) in _column && MAX('Table'[Dropped from]) in _column,"dropped", MAX('Table'[Enrolled from]) in _column && MAX('Table'[Activated from]) in _column,"active", MAX('Table'[Enrolled from]) = MAX('Table'[Activated from]) ,"active")Measure 2 = COUNTX( FILTER(ALL('Table'), [Measure]=MAX('Group_Table'[Group])),[Person ID])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