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 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! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
101 | |
74 | |
43 | |
38 | |
31 |
User | Count |
---|---|
166 | |
90 | |
65 | |
46 | |
43 |