The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want to display both absolute and % in Matrix BI. please help.
Completed | pending | Total | |
KA | 150 ( 75 %) | 50 ( 25% ) | 200 |
Hi @lm_suresh ,
Thank you for reaching out to Microsoft fabric community.
Try these steps -
Create the Measure
Count with Percentage =
VAR TotalCount =
CALCULATE(
SUM('StatusTable'[Count]),
ALLEXCEPT('StatusTable', 'StatusTable'[State])
)
VAR CurrentCount =
SUM('StatusTable'[Count])
VAR Pct =
DIVIDE(CurrentCount, TotalCount, 0)
RETURN
FORMAT(CurrentCount, "#,##0") & " (" & FORMAT(Pct, "0%") & ")"
Create a Matrix Visual
Switch to the Report view
Add a Matrix visual from the Visuals pane
Matrix Area
Field to Use
Rows: State
Columns: Status
Values: Count with Percentage
Please find the attached .pbix file for your reference.
Hi @lm_suresh ,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Hi @lm_suresh ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you
Hi @lm_suresh ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions
Suppose your table has columns like:
Status (Completed / Pending)
Region
Count or ID (something to aggregate)
You can create a measure like this:
CompletedText =
VAR CompletedCount = CALCULATE(COUNTROWS('YourTable'), 'YourTable'[Status] = "Completed")
VAR TotalCount = CALCULATE(COUNTROWS('YourTable'))
VAR Percent = DIVIDE(CompletedCount, TotalCount)
RETURN
CompletedCount & " (" & FORMAT(Percent, "0%") & ")"
Hi @lm_suresh,
Refer to this -
Here's the code:
This is very simple
% = DIVIDE ( [measure], CALCULATE [measure], REMOVEFILTERS (<column with the values completed/pending>)
Another point is if you want to show the string you are showing, so a single measure showing the absolute vaues and then "(" and the % value anf then ")"
in this case the measure would be
String = [measure] & " (" & FORMAT([%meas], "Percent") & " )"
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI