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.
I have the below model:
And when I want to display revenue by segment, it just gives me the totals:
(The above is wrong; it should roughly be half for A and half for B, but it just displays totals 3 times...)
Is there a function in dax I have to use to enforce this segmentation?? (the segmentation comes from ClientType, which is not directly related, but through Client.
Solved! Go to Solution.
@Anonymous You could try:
CALCULATE(
SUM('Revenue'[Revenue]),
TREATAS(DISTINCT('ClientType'[ClientNo]),'Client'[ClientNo])
)
How many records are in each table? Also, the relationships shown in your image seem to be impossible. You have multiple paths between the Client table and the Revenue table and so there is a relationship that would need to be inactive.
thanks for your answer, unfortunately I get:
@Anonymous You could try:
CALCULATE(
SUM('Revenue'[Revenue]),
TREATAS(DISTINCT('ClientType'[ClientNo]),'Client'[ClientNo])
)
How many records are in each table? Also, the relationships shown in your image seem to be impossible. You have multiple paths between the Client table and the Revenue table and so there is a relationship that would need to be inactive.
@Anonymous Well, you could use a technique I call DAX Table Hopping:
Measure =
VAR __Clients = DISTINCT('ClientType'[ClientNo])
VAR __KeyCustomers = DISTINCT(SELECTCOLUMNS(FILTER('Client',[ClientNo] IN __Clients),"__Key_Customer",[Key_Customer]))
RETURN
SUMX(FILTER('Revenue',[Key_Customer] IN __KeyCustomers),[Revenue])
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |