Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I am completely new to Power BI, I have been trying to use a Switch True to replace blank value into a Matrix table, but I can't get it to work if I use a calculation of other fields, if I type the amounts on the code it works fine,
But I am trying to get it to calculate a margin= Sales-COGS and input this into a row.
Any help will be really appreciated,
Thanks
Alban
Hi @Anonymous,
According to your description, I think you need to check your records to confirm if these blank parts really exist in your table.
If all records exist in your table, you can simply replace them based on measure formula and if statement.
If some of the records didn't exist in your table and they only work as the placeholder that generated by matrix column, row categories analysis layout. I think You need to extract the category fields which not have all matched records to new tables, then you can use two table fields as matrix column/row fields.
After these steps, you can write a measure formula to lookup value based on the current category data label and set a default result with not matched records and use on the matrix value field.
Regards,
Xiaoxin Sheng
@Anonymous
Are you trying to build a measure slicer ?
Thanks for your reply @amitchandak ,
No it won't be a slicer, if you look at the matrix below, I am trying to replace the value for "Total Sales" (which is blank for now) using switch true, by calculating a sub total of all sales, ie adding "Allied sales" and "Outside sales",
Type | Amount |
Allied Sales | 30,000 |
Outside Sales | 40,000 |
Total Sales |
Hope this helps
Did you ever figure this out? I'm having the exact same issue. If I replace the calculated item [Total Sales] with a hard number, the switch function shows the number, but the calculated item is always null.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |