The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello! I am really new to Power BI Report Builder so I am still learning my way around.
I am building a report for our tenant's leases (Lease Abstract). All of the data is imported from a SQL server and this particular DataSet is called DataSet1. I am trying to hide these below fields IF they are Null values.
I do not want to change the query to exlude results that have null values in these columns (WHERE statement). So, for example, in this particular lease abstract amendments 2-10 have null values but amendment 1 does not:
Is there any way to hide amendment 2-10? I have tried using the textbox properties and used "Show or hide based on an expression". I have tried
[=IIF(IsNothing(First(Fields!Amendment_1.Value, "DataSet1")))]
[=IIF(First(Fields!Amendment_1.Vlaue, "DataSet1") = NULL, true, false)] [as well as false, true]
[=IIF(Fields!Amendment_1.Value = NULL, true, false)] [as well as false, true}
All of these return a series of errors such as
"Overlaod resultion falied becuase no accessible 'IIF' accepts this number of arguements" - this was returned on the first attempt above.
"The Hidden expression for the text box 'Amendment_1' refers to the field 'Amendement_1'. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case." - I get this error on the last two attempts above.
Any suggestions?
Thank you!
Is there any way to make the fields a table with the headers on the left side (row headers) instead of column headers? I have tried a matrix and that didn't really work either (I might be putting it together wrong)
The first expression should work, but the IIF function expects 3 parameters, an expression the the value to return if the expression is true and the value to return if the expression is false.
In your example you would want to return False if the field is Nothing and True if it has a value so something like the following will work.
[=IIF(IsNothing(First(Fields!Amendment_1.Value, "DataSet1")), False, True)]
Note that because you have 10 hard coded text boxes you can hide these from being displayed, but this will not re-claim the blank space. If you want the blank space to expand/collapse you would be better to rebuild this so that the attachements are rows in a dataset, then you could build this output as a table rather than individual text boxes.
I tried this on Amendment 2 and this is the error i got
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
1 |
User | Count |
---|---|
7 | |
4 | |
4 | |
3 | |
2 |