Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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:
Here is the incorrect output:
Here is the DAX code of the two measures:
Here is the data from the simple 2 table data model used to demonstrate the problem.
I can provide a PBIX file that demonstrates the problem if needed.
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.
Hi @MichaelOgaz
The Date column in the table visual is coming from which table?
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:
Measure 27 is just SUM
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.
User | Count |
---|---|
66 | |
46 | |
20 | |
18 | |
15 |
User | Count |
---|---|
120 | |
41 | |
40 | |
28 | |
23 |