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
Kolumam
Post Prodigy
Post Prodigy

Issue with a column as a slicer

Hi All,

 

I have created the below table with the values.

Savings Selector = 
DATATABLE(
    "Index", INTEGER,
    "MyColumns", STRING,
    {
        { 1, "Flat" },
        { 2, "Escalating" },
        { 3, "Discounted"}
    })

Then I create a measure to use a column a a slicer.

Tariff (new) = 
VAR selectedcolumn =
    SELECTEDVALUE ( 'Savings Selector'[Index] )
RETURN
    SWITCH (
        TRUE (),
        selectedcolumn = 1, SUM ( Savings[Flat tariff savings (THB)] ),
        selectedcolumn = 2, SUM (Savings[Escalating tariff savings (THB)] ),
        selectedcolumn = 3, SUM (Savings[Discount tariff savings (THB)]))

The issue now is when I click on the slicer individually it is working fine but if I select multiple items it goes blank as I haven't defined in the Tariff (new). Please see screenshots for understanding.

daxcasdfas.JPG

berandnew.JPG

1 REPLY 1
Thejeswar
Resident Rockstar
Resident Rockstar

@Kolumam,

I don't think showing data for multiple Index selections is possible when you are using only one variable to store the value.

 

A Variable can take only one vale as an input. Hence when you select multiple values in your index, your variable value becomes blank and hence the graph also returns blank

 

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.