Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello everyone!
I have a simple Measure, that should show me a specific attribute of our Attribute Master for a Sales Order.
Unfortunately, this measure shows me every attribute of the attribute column. Maybe something is not clear with the data model.
The model has the following structure:
tblAttribute
Product | Attribute 1 | Attribute 2 | Attribute 3 |
111 | X | Y | Z |
tblSales
Order | Product | Date |
100-01 | 111 | 01.08.2020 |
tblSalesRouting
Order | State | Date | Value |
100-01 | 40 | 01.08.2020 | 500 |
100-01 | 95 | 06.09.2020 | 320 |
The tblSales is linked with the Product column to the tblAttribute (Many-to-One > Single).
The tblSalesrouting is linke with the Order column to the tblSales (Many-to-One > Single).
Now I need a measure that shows me the Attribute 1 for each Order.
How would you build this?
Hi, @joshua1990 , you may want to try this measure,
Attr1 via tblSales = CALCULATE ( MAX ( tblAttribute[Attribute 1] ), CALCULATETABLE ( tblSales ) )
As you know, DAX expression is subject to data model in a very delicate way, this measure does the trick when you select tblSales[Order] in a table/matrix viz.
If tblSalesRouting[Order] is used, you might want to try this measure instead,
Attr1 via tblSalesRouting = CALCULATE ( MAX ( tblAttribute[Attribute 1] ), CALCULATETABLE ( tblSalesRouting ) )
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |