Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I have a clustered column chart that shows the percentages of "Status" within each "Group". Examples below with generic labels.
DAX Code:
ALLEXCEPT removes all filters apart from GROUP, so this would make sense the filters do not affect it.
You can use a variable instead.Try:
Status% = VAR _group = SELECTEDVALUE ('Table'[Group]) RETURN DIVIDE( DISTINCTCOUNT('Table'[Item ID]), CALCULATE( DISTINCTCOUNT('Table'[Item ID]), 'Table'[Group]) = _group ) ) + 0
Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!
Stay up to date on
Read my blogs on
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
Hi Steve, thanks for replying!
I tried that DAX expression and received the following error:
"MdxScript(Model) (9, 5) Calculation error in measure 'Table'[Status%]: DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values."
Is
SELECTEDVALUE ('Table'[Group])
and
'Table'[Group]) = _group
from the same table? If not, check that they are the same data type
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
Yes sir.
Where do you get the error? Does the DAX in the measure underline any part
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
There is no red line. Below is the expression I entered with actual table/column names.
"Destination Contact Name" is a Text field
"Shipment EXTERNAL ID Type" is a Whole Number field
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |