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.
Hi Experts,
I have an issue.
Dataset A has a measure called distinct counts of ID by different networks. And a rank measure to show which has the highestr to lowest.
Dataset A has thousands of rows by Network and ID and geographical regions (State, County, City, Zip etc.)
Network | Count | Rank |
ABC | 123 | 4 |
BCD | 250 | 2 |
CDF | 231 | 3 |
DFG | 333 | 1 |
Dataset B has thousands of rows for JUST Network BCD and IDs again by georgraphical regions.
So say, BCD has a count of 350 NOW.
I need to calculate new rank, with all networks from Dataset A but only for Network BCD, I need to get the counts from Dataset B.
How should that measure be? What is the DAX? This DAX should also be filterable by geographic regions.
Please can someone help me?
Thank you.
Solved! Go to Solution.
Hi @sthomas38 ,
According to your description, here are my steps you can follow as a solution.
(1) We can create measures.
new count =
VAR _BCD=CALCULATE([count_b_measure],FILTER(ALL('Dataset B'),[Network]="BCD"))
RETURN IF(MAX('Dataset A'[Network])="BCD",_BCD,[count_a_measure])
new rank = RANKX(ADDCOLUMNS(ALLSELECTED('Dataset A'),"new count",[new count]),[new count],,DESC,Dense)
(2) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sthomas38 ,
According to your description, here are my steps you can follow as a solution.
(1) We can create measures.
new count =
VAR _BCD=CALCULATE([count_b_measure],FILTER(ALL('Dataset B'),[Network]="BCD"))
RETURN IF(MAX('Dataset A'[Network])="BCD",_BCD,[count_a_measure])
new rank = RANKX(ADDCOLUMNS(ALLSELECTED('Dataset A'),"new count",[new count]),[new count],,DESC,Dense)
(2) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
10 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
8 |