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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
joshua1990
Post Prodigy
Post Prodigy

Calculation Groups based on Columns

Hi experts!

Is it possible to create calculation group based on columns instead of measures?

I habe a table that contains some calculated column that display TRUE/FALSE.

The idea is to group these columns into a slicer to filter true/false for each column.

Is it possible to get it done with calculation groups?

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @joshua1990,

 

According to the document, Calculation groups can significantly reduce the number of redundant measures you have to create, by allowing you define DAX expressions as calculation items that apply to the existing measures in your model. Therefore, calculation groups do not support calculated columns. If you want to be able to filter the true/false values of any calculated column in the slicer, you can follow these steps:

(1) Create a field parameter for the calculated column.

vtangjiemsft_0-1716776332769.png

(2) Create a slicer table.

vtangjiemsft_1-1716776426588.png

(3)Create a measure.

Measure = SWITCH(TRUE(), SELECTEDVALUE('Parameter'[Parameter Order])=0 && MAX('Table'[Column 1])="TRUE" && SELECTEDVALUE('Slicer table'[slicer])="TRUE",1, SELECTEDVALUE('Parameter'[Parameter Order])=0 && MAX('Table'[Column 1])="FALSE" && SELECTEDVALUE('Slicer table'[slicer])="FALSE",1, SELECTEDVALUE('Parameter'[Parameter Order])=1 && MAX('Table'[Column 2])="TRUE" && SELECTEDVALUE('Slicer table'[slicer])="TRUE",1, SELECTEDVALUE('Parameter'[Parameter Order])=1 && MAX('Table'[Column 2])="FALSE" && SELECTEDVALUE('Slicer table'[slicer])="FALSE",1,0)

(4) Place a measure equal to 1 on the visual's filtering.

vtangjiemsft_2-1716777411503.png

 

 

 

Best Regards,

Neeko Tang

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

View solution in original post

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @joshua1990,

 

According to the document, Calculation groups can significantly reduce the number of redundant measures you have to create, by allowing you define DAX expressions as calculation items that apply to the existing measures in your model. Therefore, calculation groups do not support calculated columns. If you want to be able to filter the true/false values of any calculated column in the slicer, you can follow these steps:

(1) Create a field parameter for the calculated column.

vtangjiemsft_0-1716776332769.png

(2) Create a slicer table.

vtangjiemsft_1-1716776426588.png

(3)Create a measure.

Measure = SWITCH(TRUE(), SELECTEDVALUE('Parameter'[Parameter Order])=0 && MAX('Table'[Column 1])="TRUE" && SELECTEDVALUE('Slicer table'[slicer])="TRUE",1, SELECTEDVALUE('Parameter'[Parameter Order])=0 && MAX('Table'[Column 1])="FALSE" && SELECTEDVALUE('Slicer table'[slicer])="FALSE",1, SELECTEDVALUE('Parameter'[Parameter Order])=1 && MAX('Table'[Column 2])="TRUE" && SELECTEDVALUE('Slicer table'[slicer])="TRUE",1, SELECTEDVALUE('Parameter'[Parameter Order])=1 && MAX('Table'[Column 2])="FALSE" && SELECTEDVALUE('Slicer table'[slicer])="FALSE",1,0)

(4) Place a measure equal to 1 on the visual's filtering.

vtangjiemsft_2-1716777411503.png

 

 

 

Best Regards,

Neeko Tang

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

joshua1990
Post Prodigy
Post Prodigy

No ideas?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors