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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi experts,
i need to create 2 simple measure need help!!!
Below Measure 1: Its actually max value of taget for each city partition by conusmer segment.
Measure 2: It is name of segment which gives max values.
Note : Here Target is a calculated measure not directly coming from database.
Please let me know any dax function which can help to achieve,
thanks.
Please use the PBIX=> pbix
Solved! Go to Solution.
Hi,
Please find attached the PBI file.
Hope this helps.
Hi @Nobie
Would something like this work?
Measure1 =
CALCULATE(
MAX( 'Targets'[Target] ),
ALLEXCEPT( 'Targets', 'Targets'[City] )
)
Measure2 =
CALCULATE(
MAX( 'Targets'[Customer Segment] ),
FILTER(
ALLEXCEPT( 'Targets', 'Targets'[City] ),
'Targets'[Target] = [Measure1]
)
)
Not working
Hi @Nobie
Maybe try this
Measure1 =
CALCULATE(
MAX( 'Targets'[Target] ),
ALL( 'Targets'[Customer Segment] )
)
Measure2 =
CALCULATE(
MAX( 'Targets'[Customer Segment] ),
FILTER(
ALL('Targets'[Customer Segment], 'Targets'[Target] ),
'Targets'[Target] = [Measure1]
)
)
hi @gmsamborn ,
thanks fro helping but this also didn't work,
i am attaching the pbix here plz download PBix
Do you have additional columns besides the 3 in your example?
If so, can you show the following?
1) Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
2) Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
3) Please explain how you would expect to get from step 1 to 2.
My pbix: Max Based on Category.pbix
I hope this helps.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 119 | |
| 100 | |
| 72 | |
| 69 | |
| 65 |