cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Talksken Regular Visitor
Regular Visitor

power bi dynamic slicer row matrix selection

I have a matrix on brand and country.
Now I want let the user choose If they want to see the generic cost. I prefer not to have a slicer with all the brands. (Generic is a brand in this case).
This is what I tried, but it gives me an empty matrix:

ReportFilter = 
    IF(HASONEVALUE(ReportFilters[ReportFilters]),
    SWITCH(VALUES(ReportFilters[ReportFilters]),
        "All", [Total AdwordsCost],
        "All(eclusief Generic)", CALCULATE([Total AdwordsCost], FILTER('Brands','Brands'[Brand] <> "Generic"))
        ),

Please help me out.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: power bi dynamic slicer row matrix selection

Hi @Talksken,

 

Based on my test. Your formula worked well in my side. Also I create another measure to work on it, it worked well as well.

 

Measure = var sele = SELECTEDVALUE(ReportFilters[ReportFilters])
return
IF(sele="All",[Total AdwordsCost],IF(sele="All(eclusief Generic)",CALCULATE(SUM(Brands[Column3]),FILTER(Brands,'Brands'[Brand] <> "Generic"))))

Capture.PNG

 

For more details ,please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
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
Community Support Team
Community Support Team

Re: power bi dynamic slicer row matrix selection

Hi @Talksken,

 

Could you please share your sample data and excepted reuslt to me. You can upload your files to one drive and share the link to me.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Talksken Regular Visitor
Regular Visitor

Re: power bi dynamic slicer row matrix selection

Dear @v-frfei-msft

 

Is screenshot of the sample data enough?2018-12-05 10_59_11-Untitled - Power BI Desktop.png

Community Support Team
Community Support Team

Re: power bi dynamic slicer row matrix selection

Hi @Talksken,

 

Based on my test. Your formula worked well in my side. Also I create another measure to work on it, it worked well as well.

 

Measure = var sele = SELECTEDVALUE(ReportFilters[ReportFilters])
return
IF(sele="All",[Total AdwordsCost],IF(sele="All(eclusief Generic)",CALCULATE(SUM(Brands[Column3]),FILTER(Brands,'Brands'[Brand] <> "Generic"))))

Capture.PNG

 

For more details ,please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
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

Talksken Regular Visitor
Regular Visitor

Re: power bi dynamic slicer row matrix selection

@v-frfei-msft 

 

Indeed the formula worked perfect Smiley Happy. I Have made a typo.

Thanks for your cooperation.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 240 members 2,437 guests
Please welcome our newest community members: