Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
I am trying to create a matrix that will have some text values in the columns.
Unfortunetaly Power Bi assumes that i want the first value as subtotal or grand total.
I almost got it working by creating a measure:
Text_Measure =
var CurrentItem = SELECTEDVALUE(Projects[KEY])
RETURN
SWITCH(CurrentItem;
CurrentItem;SELECTEDVALUE(Projects[Text]);
blank()
)
The only problem i run into now that it will still shows the first value in the subtotals if there is only ONE value.
See example below:
(First_text) is the "normal" column, Text_Measure is the measure i have created that is stated here above.
As you can see it only shows a subtotal if there is only one value.
Someone has an idea how to remove the subtotal if there is only one value??
Many thanks!
Click the matrix, go to format, then subtotals and turn them off.
i hope i understood what you where looking for
use the hasonefilter function
i do not have your source data to replicate your measure but in the example below
i have a text colunm that will say Project + project number as text but only in the subrows nothing shows in subtotals or grand totals as these are replaced with blank
Measure = Var o = "PROJECT" & MAX('Table'[PROJECT]) var ret = if(HASONEFILTER('Table'[PROJECT]),o,blank()) return ret
var o can be replaced with what ever you want to appear in your table
var ret then checks if the value has only one filter for the project colunm
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |