cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
2366
Helper I
Helper I

Calculated column on calculation group table

Hi All,

 

I have a calculated group with multiple calculation items which reference different measure within my dataset. 

The calculation works when I use the default column "Name" on my visuals, however, if I create a calculated column on this table and use this column instead of the default column, the calculation group are not working.

shouldn't the behaviour be same because the calc group should still be filtering on name column since they're on the same table? 

thanks 

1 REPLY 1
OwenAuger
Super User
Super User

Hi @2366 

 

With Calculation Groups, a Calculation Item will only be applied if a single value is filtered in the original Calculation Item column, "Name" in your case.

 

Unfortunatley, it is not sufficient to crossfilter this column by filtering another columnin the same Calculation Group table.

 

One way around this that I have used in the past is to create an additional Calculation Group which applies a filter on the "Name" column of the original Calculation Group.

 

You would then apply a filter on the 2nd Calculation Group's single Calculation Item, which would have the effect of applying the original Calculation Group filter but allowing for crossfiltering.

 

Here is a Tabular Editor DAX script for an example I have for a Time Intelligence Calculation Group:

-----------------------------------------------
-- Calculation Group: 'Apply Time Intelligence'
-----------------------------------------------
-- This Calculation Group has a single Calculation Item
-- that applies a filter corresponding to the visible value(s)
-- of the original 'Time Intelligence' Calcuation Group.
-- In effect, this allows filtering of the original Calculation Group
-- using columns other than the original Calculation Item column.
CALCULATIONGROUP 'Apply Time Intelligence'[Name]    Precedence = 1

    CALCULATIONITEM "Apply Time Intelligence" = 
        CALCULATE (
            SELECTEDMEASURE (),
            VALUES ( 'Time Intelligence'[Time Calc] )
        )
        FormatString = 
            CALCULATE (
                SELECTEDMEASUREFORMATSTRING (),
                VALUES ( 'Time Intelligence'[Time Calc] )
            )

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors