Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Linechart filtering

I currently am working on a linechart wich needs to show the total sales in € per month of a specific order type. It is pretty much working except the line chart shows the total sales amount of all ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous,

    I created some data:

    Here are the steps you can follow:

    1.Use Enter data to create a table.

    2. Create measure.

    slice_amount =
    var _select=SELECTEDVALUE('Slicetable'[Slice])
    return
    IF(
        _select in {"A","B","C"},CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month])&&'Table'[OrderType]=_select)),
        CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month]))))

    3. Result:

    The slicer selects ALL to display the full monthly amount:

     

    The slicer selects A and displays the monthly amount in A:

    If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly