Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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])
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
9 |