Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have this calc col -> Punctuality = IF (OTIF[ShiftInTime]<OTIF[TimeFrom]-1/24*.25,"Early",
IF (OTIF[ShiftInTime]>OTIF[TimeFrom]+1/24*.25,"Late","On Time"
& IF (OTIF[ShiftInTime]>OTIF[TimeFrom]+1/24*1,"Perfect")))
I have this measure -> targetperc OT = LASTNONBLANK('OT%'[OT%],0.25)
I substitute the *.25 in th calc col with * targetperc OT to give me ->
Punctuality = IF (OTIF[ShiftInTime]<OTIF[TimeFrom]-1/24*[targetperc OT],"Early",
IF (OTIF[ShiftInTime]>OTIF[TimeFrom]+1/24*[targetperc OT],"Late","On Time"
& IF (OTIF[ShiftInTime]>OTIF[TimeFrom]+1/24*1,"Perfect")))
I have applied the values in OT% table to a slicer. However, when I select values in the slicer, nothing changes. Below is the table my measure is using.
What am I missing here?
Thanks for uploading the pbix.
Two things.
targetperc OT = LASTNONBLANK('OTP%'[OTP%],0.25)
Early = COUNTROWS ( FILTER ( OTIF, IF ( OTIF[ShiftInTime] < OTIF[TimeFrom] - 1 / 24 * [targetperc OT], "Early", IF ( OTIF[ShiftInTime] > OTIF[TimeFrom] + 1 / 24 * [targetperc OT], "Late", "On Time" & IF ( OTIF[ShiftInTime] > OTIF[TimeFrom] + 1 / 24 * 1, "Perfect" ) ) ) = "Early" ) )
Use of Parameters would be more appropriate solution in your case.
Parameters? Can you tell me how I can do this?
Can you please provide me a snapshot your dataset and I would be more than happy to provide you exact solution.
Here's my file. I had a go at adding a parameter and applying the values in my OT% table to it. Parameter name is OTP%.
Hi Android1,
Firstly you have to create parameter ( list of values) based on your IF% Table.
This can be done in powerquery mode. Pass on all the list of the values of IF% Table.
create a new custom column,
Pass on your formula you created before and replace the value of 0.25 with Parameter name.
This will let you choose the value later on dynamically and you can select the value of your choice.
Hope this will clarify your problem. I was unable to create this for you because of connection settings.
You have to slightly change the formula for custom column as PowerQuery works on IF logic but have to add else statment too.
Let me know if you get stuck further.
Hi
You can not use measure in calculated column. you need to come up with some other logic.
Ah, ok. Thank you.
Try changing the column data format to "general".
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
129 | |
77 | |
55 | |
41 | |
41 |
User | Count |
---|---|
200 | |
82 | |
71 | |
56 | |
50 |