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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculation Group format string expression mixing numbers and percentages help

The problem is that I want to get the Matrix and Table to recognise a figure as either a Number or a Percentage

in one column rather than having to see it in 2 columns.

 

For example. The matrix visualisation is currently showing:

Trend    Actual %             Target %             Actual (number)             Target (number)

barneybear123_0-1657721302097.png

 

What I would like to show on the matrix is  the following (this is a mock-up from excel)

barneybear123_1-1657721302104.png

 

The Tables show:

barneybear123_2-1657721302118.png

 

What I would like to show on the table is  the following (this is a mock-up from excel)

 

barneybear123_3-1657721302123.png

 

I do have a “tooltip matrix which is working and if I hover over the table it does show the following:

 

barneybear123_4-1657721302138.png

 

 

The Mainsheet fact table does have a column showing Number of Percentage

The matrix does use the No.s or % test Calculation Group (precedent group 2) – and  “Name” is in the column

barneybear123_12-1657723311564.png

 

 This is set as precedent group 2

Note: there is another Calculation group “Matrix (precent group is 3) but I have not used this yet

 

barneybear123_13-1657723311568.png

 

Calc Items

 

Expression

 

Format String Expression

Current                     

 

SELECTEDMEASURE()

 

Percent

CALCULATE (

    SELECTEDMEASURE (),

    FILTER (

        Mainsheet_1,

        [Number or Percentage] = "%"

    )

)

 

“0%”

Number

CALCULATE (    SELECTEDMEASURE (),    FILTER (         Mainsheet_1,        [Number or Percentage]  = "No."    ))

 

"0"

 

I think my issue is around the format string expression

 

I will try to find a way of linking the pibx as it will not work from my current work domain.



4 REPLIES 4
Anonymous
Not applicable

See main column headings from spreadsheet

KPI IndexSort OrderServiceProviderKPI SummaryNumber or PercentagePolarityDateYear & QtrActualTargetTarget Agreed
229Service "C"Provider "C"Length of Time in Treatment >26 week No. Lower is better30/06/20212021/22 Q1212626
2210Service "C"Provider "C"Length of Time in Treatment >26 week No. Lower is better30/09/20212021/22 Q2222626
2211Service "C"Provider "C"Length of Time in Treatment >26 week No. Lower is better31/12/20212021/22 Q3182626
2212Service "C"Provider "C"Length of Time in Treatment >26 week No. Lower is better31/03/20222021/22 Q4182626
289Service "C"Provider "C"Conversion Rate%Higher is better30/06/20212021/22 Q120.36%0.7575%
2810Service "C"Provider "C"Conversion Rate%Higher is better30/09/20212021/22 Q237.88%0.7575%
2811Service "C"Provider "C"Conversion Rate%Higher is better31/12/20212021/22 Q389.75%0.7575%
2812Service "C"Provider "C"Conversion Rate%Higher is better31/03/20222021/22 Q457.97%0.7575%
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Are Act%, Tar%, Art and Tar all your columns? Why there're not Act% and Tar% in the last spreadsheet.

Best Regards,
Community Support Team _ kalyj

Anonymous
Not applicable

Hi @v-yanjiang-msft. I have now added a clearer spreadsheet and included links to dropbox excel and pibx file.

Link to excel file 

Link to PIBX 

 

The main columns are Actual and Target. In the "Matrix" the Act% Tar% Act and Tar come from the Calculation Group "No.s or % test" and I just use the "Name" in the "Column" of the visual.
I then went into format painter, into a column header and changed the font colour from black to white (so you could not see the column header colour) I then added 5 x text boxes just for visual display (Trend, Act%, Tar%, Act, Tar)barneybear123_12-1657723311564.pngText boxes.png

 

Calc Group .jpg

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.