Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Calculation item in slicer

I have multiple calculation items in one calculation group like; MTD, PMTD, YTD, PYTD, CM, LM But in my report i want to show them as groups using a slicer, so for example i only want to show MTD and PMTD but this under 1 button in the slicer, like:

"MTD VS PMTD" is one button in the slicer that shows calculation items MTD an PMTD in my matrix,
"YTD VS PYTD" //,
"CM VS LM" //.

But i don't know how to group calculation items like this in tabular edidtor?

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi, Anonymous 

     

    Currently, the slicer feature of DAX and Power BI does not directly support creating a button in a slicer to represent multiple computed items. But there are other ways you can try to simulate this effect.

    Create a new calculation in your calculation group, such as "MTD VS PMTD", and the DAX expression of this calculation can be a combination of the results of MTD and PMTD.

    Or you can use the bookmarks feature to create multiple bookmarks, each representing a view of a set of calculated items. Then when you select a different calculated item in the slicer, use the bookmark to switch views.

    Write a DAX Measure to write one or more DAXs that dynamically return the values of calculated items based on the selections in the slicer, and then use those measures in the visual instead of directly using the calculated items in the calculated group.

    Of course, you can vote or create your ideas in the following places: Home (microsoft.com)

     

     

    How to Get Your Question Answered Quickly 

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

    Best Regards

    Yongkang Hua

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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, Anonymous 

     

    Currently, the slicer feature of DAX and Power BI does not directly support creating a button in a slicer to represent multiple computed items. But there are other ways you can try to simulate this effect.

    Create a new calculation in your calculation group, such as "MTD VS PMTD", and the DAX expression of this calculation can be a combination of the results of MTD and PMTD.

    Or you can use the bookmarks feature to create multiple bookmarks, each representing a view of a set of calculated items. Then when you select a different calculated item in the slicer, use the bookmark to switch views.

    Write a DAX Measure to write one or more DAXs that dynamically return the values of calculated items based on the selections in the slicer, and then use those measures in the visual instead of directly using the calculated items in the calculated group.

    Of course, you can vote or create your ideas in the following places: Home (microsoft.com)

     

     

    How to Get Your Question Answered Quickly 

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

    Best Regards

    Yongkang Hua

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