Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hi all
I need assistance with a report on Power BI report builder.
I have a code and description but if that description is blank, it must use a different fields description.
I have the below code that works on the code & description but if the description is blank, it must use the function description instead with the code. Some of the codes have descriptions but for the codes with no description, it must pull from the function description.
=IIF(IsNOTHING(Fields!Code.Value), " ", IIF(Parameters!SHOWCODE.Value = True, Fields!Code.Value + " - " + Fields!Description.Value, Fields!Description.Value))
I hope someone will be able to assist me in the right direction.
Solved! Go to Solution.
HI @Timothyg ,
Try to modify your expression using this, and let me know if worked:
=IIF(IsNothing(Fields!Code.Value), " ",
IIF(Parameters!SHOWCODE.Value = True,
Fields!Code.Value + " - " +
IIF(IsNothing(Fields!Description.Value) OR Fields!Description.Value = "", Fields!FunctionDescription.Value, Fields!Description.Value),
IIF(IsNothing(Fields!Description.Value) OR Fields!Description.Value = "", Fields!FunctionDescription.Value, Fields!Description.Value)
)
)
If this help you, please consider to mark it as solution and give a kudo.
Thank you
HI @Timothyg ,
Try to modify your expression using this, and let me know if worked:
=IIF(IsNothing(Fields!Code.Value), " ",
IIF(Parameters!SHOWCODE.Value = True,
Fields!Code.Value + " - " +
IIF(IsNothing(Fields!Description.Value) OR Fields!Description.Value = "", Fields!FunctionDescription.Value, Fields!Description.Value),
IIF(IsNothing(Fields!Description.Value) OR Fields!Description.Value = "", Fields!FunctionDescription.Value, Fields!Description.Value)
)
)
If this help you, please consider to mark it as solution and give a kudo.
Thank you
Hi @Timothyg - you can adjust your expression to add this fallback logic.
=IIF(IsNothing(Fields!Code.Value),
" ",
IIF(Parameters!SHOWCODE.Value = True,
Fields!Code.Value & " - " &
IIF(IsNothing(Fields!Description.Value) OR Trim(Fields!Description.Value) = "", Fields!FunctionDescription.Value, Fields!Description.Value),
IIF(IsNothing(Fields!Description.Value) OR Trim(Fields!Description.Value) = "", Fields!FunctionDescription.Value, Fields!Description.Value)
)
)
Function Description when Description is blank, displaying the Code only when SHOWCODE is set to True
Hope this helps.
Proud to be a Super User! | |
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 |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 34 | |
| 33 | |
| 30 |