Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Dynamic visual level filter (calculated Measure Flag)

Hi,

 

I'm using SSAS tabular Model as source for Power BI report.

Existing Set-up:

  • I have Time Filter with values "Last Week", "Last 4 Weeks", "Last 3 Motnhs" 

Time Filter

Last Week

Last 4 Week

Last 3 Motnhs

  • And have Flag columns for each Time value (above) in another table 

Route

LastWeekFlag

Last4WeekFlag

Last3MonthsFlag

A

1

1

 

B

 

1

1

C

1

 

 

D

 

 

1

E

 

 

1

 

Expected Output in Power BI:

  • if Time Filter = "Last Week". Note - Measure should be visual level filter to apply on visual

Route

Measure

A

1

C

1

  • if Time Filter = "Last 4 Weeks". Note - Measure should be visual level filter to apply on visual

Route

Measure

A

1

B

1

  • if Time Filter = "Last 3 Months". Note - Measure should be visual level filter to apply on visual

Route

Measure

B

1

D

1

E

1

 

Please help me to solve this scenario.

 

Thanks,

 

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi @Anonymous , 

Two workarounds: Convert table structure or try to use slicer to achieve this goal(single selection). You could refer to my sample for details.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
dax
Community Support
Community Support

Hi @Anonymous , 

Two workarounds: Convert table structure or try to use slicer to achieve this goal(single selection). You could refer to my sample for details.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hi @cst,

 

Thanks for your time.

 

I gone through pbix provided, Workaround#1 (change table structure not feasible in my case, because it will change grain of data).

Workaround#2 (slicer with single selection) same solution I implemented last Friday, as small POC. So I concluded 2nd approach worked for my initial requirement.

Next I have to build next brick on top of it, which sounds more complicated requirement (I will post it here, if needed).

 

I'm happy to accept this as solution 🙂

 

Thanks a lot!

 

amitchandak
Super User
Super User

@Anonymous , refer if this can help

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hi Amit,

 

Thanks for reply. 
Gone through link sent, solution not fits into my problem statement.

 

Thanks,

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.