Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I need urgent help. I am new user who is struggling with an error message shown below:
Error+Message%3A+MdxScript(Model)+(7%2C+138)+Calculation+error+in+measure
This comes when i write a calculate measure with a filter that is TRUE/FALSE type.
Can someone rescue me? Below is the measure;
Prog Stock value(Expired & Closed) = ( SUMX( FILTER('Current Stock Report','Current Stock Report'[SOF Status]="SOF Closed"||'Current Stock Report'[SOF Status]="SOF Expired"||'Current Stock Report'[Prog / Admin Stock]="False"), ('Current Stock Report'[TIM Stock Value ($)]) ))
Solved! Go to Solution.
[TIM Stock Value] = CALCULATE( SUM ( 'Current Stock Report'[TIM Stock Value ($)] ), 'Current Stock Report'[Prog / Admin Stock] -- this only keeps the TRUE values visible )
Best
D.
[Prog Stock Value (Expired & Closed)] = SUMX ( FILTER ( 'Current Stock Report', 'Current Stock Report'[SOF Status] = "SOF Closed" || 'Current Stock Report'[SOF Status] = "SOF Expired" || NOT ( 'Current Stock Report'[Prog / Admin Stock] ) ), 'Current Stock Report'[TIM Stock Value ($)] )
You cannot mix data types. If something is logical (False) you cannot equate it to a string ("False").
Best
Darek
Thank you Darek.
Then I need your suggestion. For below, I need to calculate the sum of TIM stock Value
'Current Stock Report'[TIM Stock Value ($)]
but only filter out what is 'False' in
( 'Current Stock Report'[Prog / Admin Stock]
The later is a true False data type.
Any suggestion?
[TIM Stock Value] = CALCULATE( SUM ( 'Current Stock Report'[TIM Stock Value ($)] ), 'Current Stock Report'[Prog / Admin Stock] -- this only keeps the TRUE values visible )
Best
D.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |