Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello community.
I need some help with creating a percentage based on buttom of a table and the top.
I need it to take the 86.160,69 (Dækningsbidrag) and divide it by 95.038,00 (Omsætning) and shown as a percentage beside the number 86.160,69.
Any help would be appreciated.
Solved! Go to Solution.
Hi @tobkres
Please try this code. Please adjust the spilling of the words.
Bel∅b Measure =
VAR NormalValue =
SUM ( TableName[Bel∅b] )
VAR OmstaetningValue =
CALCULATE (
SUM ( TableName[Bel∅b] ),
TableName[N∅glital DKK] = "OmstaetningValue"
)
RETURN
IF (
HASONEVALUE ( TableName[N∅glital DKK] ),
NormalValue,
NormalValue & " ("
& FORMAT ( DIVIDE ( NormalValue, OmstaetningValue ), "Percent" ) & ")"
)
Thank you for helping me out. I have tried, but i get the following error.
Column 'Inversbeloeb' in table 'MeasureTable' cannot be found or may not be used in this expression.
This is the code:
DG percentage =
VAR NormalValue =
SUM ( MeasureTable[Inversbeloeb] )
VAR RevenueValue =
CALCULATE(
SUM ( MeasureTable[Inversbeloeb] ),
Sortorder[KontoOverskrift] = "RevenueValue"
)
RETURN
IF (
HASONEVALUE ( Sortorder[KontoOverskrift] ),
NormalValue,
NormalValue & " ("
& FORMAT ( DIVIDE ( NormalValue, RevenueValue ), "Percent" ) & ")"
These are the fields.
Have i missed something?
@tobkres
Please try
DG percentage =
VAR NormalValue = [Inversbeloeb]
VAR RevenueValue =
CALCULATE ( [Inversbeloeb], Sortorder[KontoOverskrift] = "RevenueValue" )
RETURN
IF (
HASONEVALUE ( Sortorder[KontoOverskrift] ),
NormalValue,
NormalValue & " ("
& FORMAT ( DIVIDE ( NormalValue, RevenueValue ), "Percent" ) & ")"
)
Seems like it just returns the same numbers.
@tobkres
Please make sure you are using the correct spilling. Copy the name from inside the column. If you want we can connect via zoom. Will take only 10min to sort it out.
Hi @tobkres
Please try this code. Please adjust the spilling of the words.
Bel∅b Measure =
VAR NormalValue =
SUM ( TableName[Bel∅b] )
VAR OmstaetningValue =
CALCULATE (
SUM ( TableName[Bel∅b] ),
TableName[N∅glital DKK] = "OmstaetningValue"
)
RETURN
IF (
HASONEVALUE ( TableName[N∅glital DKK] ),
NormalValue,
NormalValue & " ("
& FORMAT ( DIVIDE ( NormalValue, OmstaetningValue ), "Percent" ) & ")"
)
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
89 | |
80 | |
60 | |
59 | |
58 |
User | Count |
---|---|
157 | |
118 | |
103 | |
76 | |
66 |