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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
joshua1990
Post Prodigy
Post Prodigy

Rename Calculation Items from Calculation Group in Power BI

Hi all.

I have created a calculation group for a specific visual / report with 10 calculated items.

The names are something like:

  • Sales TOP 10
  • Sales TOP 20
  • Sales TOP 30
  • Revenue TOP 10
  • Revenue TOP 20
  • Revenue TOP 30

I created a calculated column in Power BI in the Calculated Group to group those between Sales, Revenue etc in the Matrix Visual.

DepartmentSales  Revenue  
 Sales TOP 10Sales TOP 20Sales TOP 30Revenue TOP 10Revenue TOP 20Revenue TOP 30
 552357

 

Now I would like to remove the prefix Sales and Revenue of the calculated item from the calculated group.

Is there any chance to solve this challange?

I allready created a second calculated column in the table (calculted group) just with TOP XX nbut when I use this in the matrix I get no values.

 

Any help here?

1 REPLY 1
OwenAuger
Super User
Super User

Hi @joshua1990 

With Calculation Groups, in order for a Calculation Item to be applied, the column containing the Calculation Items itself must be filtered (not just crossfiltered), with a single value visible.

 

If you would like to filter using calculated columns of the Calculation Group table, one option is to create a 2nd Calculation Group that applies the first Calculation Group's Calculation Item column as a filter.

 

The second Calculation Group can have a single Calculation Item:

 

CALCULATE (
    SELECTEDMEASURE (),
    VALUES ( OriginalCalculationGroup[Original Calculation Item] )
)

 

If necessary, you can also create a format string expression for this Calculation Item (only if there was a format string expression specified for the original Calculation Items):

 

CALCULATE (
    SELECTEDMEASUREFORMATSTRING (),
    VALUES ( OriginalCalculationGroup[Original Calculation Item] )
)

 

If you apply this new single Calculation Item as a filter on the visual(s), you should get the same result as if your original Calculation Group's Items had been applied.

 

The only other option I can think of is to get creative with the names of the original Calculation Items, and include a different number of zero-width space characters (Unicode character 8203 for example) to differentiate the names.

 

Regards,

Owen


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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors