March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am wanting to have the result of blank be Zero or Text (haven't decided). I have (actually my peer) tried numerous attempts at using a combination of the IF(ISBLANK) and IS(BLANK) to no avail. Hoping I can get some assistance and/or placement of syntax
Current Syntax:
Hi @bmarcowka ,
Referring to your formula, there seems to be no logical problem.
I think you can determine the correctness of the formula by returning each reference created in turn.
If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.
How to Get Your Question Answered Quickly - Microsoft Power BI Community
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @bmarcowka ,
Try to wrap the last part into a coalesce something similar to:
Most Recent Serv Charge =
VAR CustNoMaxDate =
CALCULATE (
MAX ( OrgStops[ServiceDate] ),
FILTER (
OrgStops,
EARLIER ( OrgStops[CustNo] ) = OrgStops[CustNo]
&& ( OrgStops[ServiceCharge] > 0
|| OrgStops[MonthlyCharge] > 0 )
)
)
VAR PerServiceCharge =
CALCULATE (
LASTNONBLANK ( OrgStops[ServiceCharge], 1 ),
FILTER (
OrgStops,
OrgStops[ServiceDate] = CustNoMaxDate
&& EARLIER ( OrgStops[CustNo] ) = OrgStops[CustNo]
&& OrgStops[ServiceCharge] > 0
)
)
VAR MonthlyServiceCharge =
CALCULATE (
LASTNONBLANK ( OrgStops[MonthlyCharge], 1 ),
FILTER (
OrgStops,
OrgStops[ServiceDate] = CustNoMaxDate
&& EARLIER ( OrgStops[CustNo] ) = OrgStops[CustNo]
&& OrgStops[MonthlyCharge] > 0
)
) / 4
VAR MRServCharge =
SWITCH (
TRUE (),
MonthlyServiceCharge = 0, PerServiceCharge,
MonthlyServiceCharge
)
RETURN
COALESCE ( MRServCharge, 0 )
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @bmarcowka
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |