Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am in the process of migrating a dashboard fom Tableau to PowerBI. This is how the final result looks:
Category | Avg. of Work Orders Across all Stores | Distinct Count of Work Orders for Selected Store |
Category 1 | 103.0 | 129 |
Category 2 | 33.1 | 42 |
Category 3 | 38.6 | 37 |
Category 4 | 16.9 | 35 |
Category 5 | 19.1 | 24 |
I am displaying the Top 5 Categories by Work Orders Volume for the Selected Store. I have a parameter filter that the user uses to select a store to compare against all other stores in the fleet.
Here are how I am calculating these measures in Tableau:
Measure | How to calculate it | Measure Aggregation |
Distinct Count of Work Orders for Selected Store | IF([Store #]=[Store_Parameter]) THEN [Tracking Nbr] END | Count Distinct |
Avg. of Work Orders Across all Stores | {INCLUDE [Store #] : COUNTD([Tracking Nbr])} | Average |
I am having a hard time replicating this in PowerBI as I have been searching and nothing comes up with the result I need to display.
My best guess at the measures are:
Distinct Count of Work Orders for Selected Stores =
DISTINCTCOUNT('Table'[Tracking Nbr])
Avg of Work Orders Across all Stores =
AVERAGEX(
ALL('Table'[Store #]),
DISTINCTCOUNT('Table'[Tracking Nbr])
)
Hi PaulOlding,
You are right, I forgot to post how the source data looks, here is a sample:
Store | Category | Tracking Nbr (Unique Value) |
1 | Category 1 | 123 |
1 | Category 1 | 234 |
1 | Category 2 | 345 |
1 | Category 3 | 456 |
1 | Category 4 | 567 |
2 | Category 1 | 678 |
2 | Category 2 | 789 |
2 | Category 3 | 890 |
2 | Category 4 | 098 |
I tried your example and I got this result:
Category | Avg. of Work Orders Across all Stores | Distinct Count of Work Orders for Selected Store |
Category 1 | 129 | 129 |
Category 2 | 42 | 42 |
Category 3 | 37 | 37 |
Category 4 | 35 | 35 |
Category 5 | 24 | 24 |
Results for Distinct Count of Work Orders for Selected Store are correct, however as you can see the values are the same for Avg. of Work Orders Across all Stores so this one unfortunately is not correct.
My other question is, once I bring the measure to the table, what should I choose as aggregation for each of these measures? should I just pick: Don't Summarize or should I should Avg?
I just noticed I was creating a New Column rather than a New Measure so this question doesn't make sense.
Thanks,
To be able to give a formula one has to know the model.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
26 | |
24 | |
12 | |
11 | |
10 |