Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Completely ignoring a slicer selection

 

Hi there,

 

I'd like to calculate the following:

 

When the user makes a selection in the 'Scenario' slicer, the value in 'Bedrag' should be summed for the selected scenario. On top of that the values for the years without a scenario should still be visible

 

The source table looks like this:

 

 

The matrix in the visual should display the following:

 

When selecting Scenario A                                                              

 

When selecting Scenario B

 

What currently happens when selecting a scenario the green cells aren't displayed (because they have no scenario).

 

Thanks in advance!

2 Replies

  • dax's avatar
    dax
    Community Support

    Hi wongchungjec,

    You could try below suggestions.

    You could create table like below(you could use below query in your sample directly), then create a relationship between two tables

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUdJxVIrViVZyAjGdlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [slicer = _t, SECNARIO = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"slicer", type text}, {"SECNARIO", type text}}),
        #"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type", "SECNARIO", Splitter.SplitTextByEachDelimiter({","}, QuoteStyle.Csv, false), {"SECNARIO.1", "SECNARIO.2"}),
        #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"SECNARIO.1", type text}, {"SECNARIO.2", type text}}),
        #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {"slicer"}, "Attribute", "Value")
    in
        #"Unpivoted Columns"

    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's avatar
      Anonymous
      Not applicable

      Thanks! Will have a look at it...

       

      You think it's also possible with a measure?