Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have this formula...
Solved! Go to Solution.
Got the bugger to work! Fixed my IF AND statement to read this...
Skid_Short_S1 =
IF (
Inventry[Skid_Avail_S1] <= 5
&& Inventry[Skid_Avail_FLSS]>0
,
Inventry[Skid_Avail_S1]-5,blank()
)
Got the bugger to work! Fixed my IF AND statement to read this...
Skid_Short_S1 =
IF (
Inventry[Skid_Avail_S1] <= 5
&& Inventry[Skid_Avail_FLSS]>0
,
Inventry[Skid_Avail_S1]-5,blank()
)
I tried the switch but i must have something off still as I'm getting the error "SWITCH' does not support comparing values of tru/false with values of type number"
Here what I tried to get a multi IF...
Skid_Avail_Less_Than_5_At_S1_Test =
SWITCH(Inventry[Skid_Avail_S1]<5 && Inventry[Skid_Avail_FLSS]>1,Inventry[Skid_Avail_S1]-5, blank())
Sorry, that was a calc...(Skid_Avail_S1).
I changed the formula to be like this now...
Skid_Avail_Less_Than_5_At_S1 =
IF (
Inventry[Skid_Avail_S1] < 5 & Inventry[Skid_Avail_FLSS] > 0,
Inventry[Skid_Avail_S1] - 5,
BLANK ()
)But did some more testing and it appears its the & in my statement that it does not like. I'm trying to do an IF AND statement and the format must be wrong.
Can you think of a SWITCH formula I can use to say IF Inventry[Skid_Avail_S1] < 5 AND Inventry[Skid_Avail_FLSS] > 0,
I think that will solve the problem!
In your screen shot you show the data type for Skid_Avail_FLSS in both pictures. What is Skid_Avail_S1?
Can you share your .pbix file (load it do OneDrive and share the link)?
I looked to make sure, and all fields being referenced in the calculation ARE infact number formatted. The error is bizarre?
Try it like this, I think it might be the "" on the end.
Skid_Avail_Less_Than_5_At_S1 =
IF (
Inventry[Skid_Avail_S1] < 5 & Inventry[Skid_Avail_FLSS] > 0,
[Skid_Avail_S1] - 5,
BLANK ()
)
Hey jdbuchanan71. Very cool! Thank you...but it didn't work. Still getting the same error...
DAX comparison operations do not support comparing values of type Number with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
Using the error suggestions, can you think of a VALUE or FORMAT function to insert to convert the values so it would work?
Thanks and look forward to your reply,
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |