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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
01UmaManoharan
Frequent Visitor

Measure Slicer with repeated measures on various data points

Hi All,

 

I have a scenario where I have measures on below

cancelled in 15 days, cancelled in 30 days, cancelled in 45 days, cancelled in 60 days( 4 measures)

paid in 15 days, paid in  30 days , paid in 45 days, paid in 60 days(4 measures)

unpaid in 15, 30, 45, 60 (4 measures)

all the days performace are from issued date(eg: paid in 15 days from the issued date. cancelled date is also used for cancellations)

 

I need to create a measure slicer where i need this measure names as filter. when i pick 15 days in slicer it should slice my table for all paid, cancelled, unpaid with 15 days performace.

Can you guys help me on this please?

 

Note: I just simplified the scenario, would it be possible to create a measure slicer with filed parameters, when i have mulitple measures for one category.

i did not go for calculation groups as i have no idea how to pull the calculation groups in measure slicer. in table the output should be like measures in rows and measures in values. cancelled, paid and unpaid should be rows(these are DAX calculations not an actual value in column)

 

Thanks in advance

 

1 ACCEPTED SOLUTION
Sahir_Maharaj
Super User
Super User

Hello @01UmaManoharan,

 

Can you please try the following:

 

1. Create a Disconnected Table for the Slicer

TimeFrameSlicer = DATATABLE(
    "TimeFrame", STRING,
    "Days", INTEGER,
    {
        {"15 days", 15},
        {"30 days", 30},
        {"45 days", 45},
        {"60 days", 60}
    }
)

2. Create Dynamic Measures

DynamicMeasure = 
VAR SelectedTimeFrame = SELECTEDVALUE(TimeFrameSlicer[Days], 15)
RETURN
SWITCH(
    SelectedTimeFrame,
    15, [YourMeasureFor15Days],
    30, [YourMeasureFor30Days],
    45, [YourMeasureFor45Days],
    60, [YourMeasureFor60Days],
    BLANK()
)

Hope this helps!


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

View solution in original post

1 REPLY 1
Sahir_Maharaj
Super User
Super User

Hello @01UmaManoharan,

 

Can you please try the following:

 

1. Create a Disconnected Table for the Slicer

TimeFrameSlicer = DATATABLE(
    "TimeFrame", STRING,
    "Days", INTEGER,
    {
        {"15 days", 15},
        {"30 days", 30},
        {"45 days", 45},
        {"60 days", 60}
    }
)

2. Create Dynamic Measures

DynamicMeasure = 
VAR SelectedTimeFrame = SELECTEDVALUE(TimeFrameSlicer[Days], 15)
RETURN
SWITCH(
    SelectedTimeFrame,
    15, [YourMeasureFor15Days],
    30, [YourMeasureFor30Days],
    45, [YourMeasureFor45Days],
    60, [YourMeasureFor60Days],
    BLANK()
)

Hope this helps!


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.

Users online (2,367)