Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MichaelOgaz
Advocate I
Advocate I

Incorrect result when using multiple similar measures with TREATAS and variables in the same visual.

When two measures that have a very similar looking but different calculation both use TREATAS with a variable as the first TREATAS parameter and are used in the same visual the output of one of the measures will incorrectly be a duplicate of the output of the other measure. This looks like an incorrectly applied DAX fusion optimization, which measure output gets duplicated seem to depend on which measure you add to the visual first.


This is what the output should look like:

MichaelOgaz_4-1713805428552.png

 

Here is the incorrect output:

MichaelOgaz_0-1713805197478.png

 

Here is the DAX code of the two measures:

MichaelOgaz_1-1713805267817.png

 

 

MichaelOgaz_3-1713805309964.png


Here is the data from the simple 2 table data model used to demonstrate the problem.

MichaelOgaz_1-1713805967077.png

 

 

MichaelOgaz_0-1713805941341.png

 

 

MichaelOgaz_7-1713805613054.png


I can provide a PBIX file that demonstrates the problem if needed.

5 REPLIES 5
MichaelOgaz
Advocate I
Advocate I

It is disappointing that this got moved into the DAX Help section when I created it as in Issue and I am trying to report a DAX engine optimization bug.

tamerj1
Super User
Super User

Hi @MichaelOgaz 
The Date column in the table visual is coming from which table?

Hi @tamerj1

The Column labeled Date in the table visual is 'Date'[Date].

ValtteriN
Super User
Super User

Hi,

Is there a specific reason you want to use TREATAS here? 
If you want to display running total and day values there are simpler methods. e.g. with the new visual calculations:

Data:

ValtteriN_0-1713865948264.png

ValtteriN_3-1713866070896.png

Measure 27 is just SUM





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ValtteriN 

The example data and measures I posted in this Issue are not the real world situation where I have encountered this bug. This is a set of data and measures just used to demonstrate the problem in a simple and direct way.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathonโ€”running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.