Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello! I have been trying to get the maximum of a measure for a while now and can't find any solutions to my specific situation. I have 3 tables: Employees, Revenue, and Revenue Quotas. These 3 tables are joined on Employee ID.
The measures I have already created:
Measure - RevenuePerPerson =
| quota per person | revenue per person | revenue achievement | max achievement | |
| employee 1 | $100,000 | $90,000 | 90% | 90% |
| employee 2 | $100,000 | $80,000 | 80% | 90% |
| employee 3 | $100,000 | $70,000 | 70% | 90% |
I have already tried the formulas listed below. They all returned different values for each row, not one.
Please help! Not sure what else to do.
Solved! Go to Solution.
It looks like you're trying to find the maximum value of the "RevenueAchievement" measure and have it dynamically update when filters are applied. The DAX measures you've tried are on the right track, but let's make a few modifications to achieve your goal.
You can create a measure to find the maximum "RevenueAchievement" as follows:
```DAX
Max Achievement =
VAR MaxAchievement = MAXX(ALLSELECTED('Employees'), [RevenueAchievement])
RETURN
IF(ISBLANK(MaxAchievement), BLANK(), MaxAchievement)
```
Here's what this measure does:
1. It uses the `ALLSELECTED` function to consider all filters and selections on the "Employees" table, so it dynamically updates when filters are applied.
2. It calculates the maximum value of the "RevenueAchievement" measure within the filtered context.
3. If there are no valid values (for example, if no employees meet the selected criteria), it returns a blank value to avoid displaying incorrect results.
This measure should give you the maximum "RevenueAchievement" value that updates dynamically based on your filters and selections.
Make sure to replace `'Employees'` with the actual name of your "Employees" table in your Power BI model.
Once you have this measure in your model, you can add it to your table visual alongside other relevant columns, and it should display the maximum achievement value for the selected filters.
Hi, thank you so much for your solution. It worked perfectly!
It looks like you're trying to find the maximum value of the "RevenueAchievement" measure and have it dynamically update when filters are applied. The DAX measures you've tried are on the right track, but let's make a few modifications to achieve your goal.
You can create a measure to find the maximum "RevenueAchievement" as follows:
```DAX
Max Achievement =
VAR MaxAchievement = MAXX(ALLSELECTED('Employees'), [RevenueAchievement])
RETURN
IF(ISBLANK(MaxAchievement), BLANK(), MaxAchievement)
```
Here's what this measure does:
1. It uses the `ALLSELECTED` function to consider all filters and selections on the "Employees" table, so it dynamically updates when filters are applied.
2. It calculates the maximum value of the "RevenueAchievement" measure within the filtered context.
3. If there are no valid values (for example, if no employees meet the selected criteria), it returns a blank value to avoid displaying incorrect results.
This measure should give you the maximum "RevenueAchievement" value that updates dynamically based on your filters and selections.
Make sure to replace `'Employees'` with the actual name of your "Employees" table in your Power BI model.
Once you have this measure in your model, you can add it to your table visual alongside other relevant columns, and it should display the maximum achievement value for the selected filters.
Thank you so much! It worked perfectly 🙂
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 63 | |
| 31 | |
| 30 | |
| 23 |