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.
Hi, I am trying to create a 'Fullfilment Rate' measure that calculates percentages between two values and show is as a %.
Ideally maximum % should be 100% but if it brings back more than 100% it should display something like 'Over Demand' or something that would make sense as and error message.
This is example screenshot.
Thanks.
Solved! Go to Solution.
@zenisekd I created this measure:
try:
=
IF (
DISTINCTCOUNT ( table[DocumentNumber] ) = 1,
IF (
DIVIDE ( [TotalActual] , [TotalDemand] ) > 1,
"Over Demand",
FORMAT (
DIVIDE ( [TotalActual] , [TotalDemand] ),
"Percent"
)
)
)
Kudos and mark as solution appreciated.
@zenisekdHi, unfortunately it does not work since my Total Actual and Demand are measures and not columns.
Sorry for not including in initial request message.
I adjusted it to work with measures.
Ok, try just
= IF (
DIVIDE ( [TotalActual] , [TotalDemand] ) > 1,
"Over Demand",
FORMAT (
DIVIDE ( [TotalActual] , [TotalDemand] ),
"Percent"
)
)
Yeah, that is what was the first part for... in that case stick to the previous:
=
IF (
DISTINCTCOUNT ( table[DocumentNumber] ) = 1,
IF (
DIVIDE ( [TotalActual] , [TotalDemand] ) > 1,
"Over Demand",
FORMAT (
DIVIDE ( [TotalActual] , [TotalDemand] ),
"Percent"
)
)
)
And apply a filter on top of the visual saying that Fulfilment Rate must not be blank/empty...
@zenisekd I dont know is this helpfull but DocumentNumber sits in 'Outbound Delivery Documents' table where Total Actual and Demand sits in 'Outbound Delivery' table.
Maybe that is causing additional lines?
@zenisekd What I noticed is that measure is trying to calculate for each 'ItemNumber' for each 'DocumentNumber' even when there is no Actual or Demand data in them.
As I said previously, just filter the blanks out on the visual. I don't have the sample data to play with it so, I consider this the best solution.
@zenisekd I just tried to add is not blank filter like you suggested, but it did not work for some reason.
It does not allow me to enter any text only asking for numbers.
use "is not empty" instead.
I tried to replicate this on my sample data and it is there.
...
@zenisekd I created this measure:
I am confused here, previously you said, that it is two measures and that you want the text there, if it is over 1...?
@zenisekd Yes, but as you seen trying to add text for some reason creates addition rows.
And for some reason removing blanks does not remove them and I don't get choice to remove empty.
The 'Total Actual' and 'Total Demand' are a measures and not a column.
I cant create calculated columns since I am using company data model that is Live connected.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
92 | |
83 | |
62 | |
62 | |
58 |
User | Count |
---|---|
157 | |
118 | |
103 | |
76 | |
66 |