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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sander1401
Helper I
Helper I

1 visual with 2 field parameters

Hi all,

I need some help.
I want to built 1 visual (stacked bar chart) with 2 field parameters.
The visual needs the possibillity to switch between absolute figures vs percentual, but also the possibillity to change the legend of the stacked bar.
The absolute figures formula is just 1 field, but the percentual formula is depending on the dimension of the legend, this is my formula when I don't have the possibillity to change the legend:

 
Percentual =
    DIVIDE(
        SUM('Fact'[Count]),
        CALCULATE(
            SUM('Fact'[Count]),
            REMOVEFILTERS('Fact'[Legend-dim1])
        ))
 
So I want 1 visual with 2 slicers:
1. absolute vs percentual
2. legend-dimension 1 vs legend-dimension 2
 
In this PBIX I've made a simple dashboard with 2 visuals, can anyone help me if it's possible to combine these?
Dashboard 2 field parameters 
 
I am stuck!
2 REPLIES 2
amitchandak
Super User
Super User

@Sander1401 , Check the attached file after signature

 

Unfortunately this isn't working properly, this is just the problem I also had.
Just look at the Y-axis of the visuals when selected percentual and legend-dim2:

Sander1401_0-1679587955580.png

The formula of the percentual measure is 'focused' on legend-dim1, so when legend-dim2 is selected, it doesn't work.
But I do not know how to fix it.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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