Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi Teams,
@INTURI_SUPARNA_ @andre
How can i provide the correct max sales which matches with table matric and card metric as well.
Thanks and Regards,
Sudeep Kumar
Solved! Go to Solution.
Hi @Sudip_J ,
Thank you for reaching out to Microsoft fabric community forum. Also thank you @Ashish_Excel , @danextian , @sevenhills , @burakkaragoz for your inputs.
Since the date which you provided is bit confusing so could you please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Thank you.
Hi @Sudip_J ,
Could you please confirm whether you have resolved issue. If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. This will be helpful for other community members who have similar problems to solve it faster.
If we don’t hear back, we’ll go ahead and close this thread.Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.
Thank you.
Hi @Sudip_J ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @Sudip_J ,
Thank you for reaching out to Microsoft fabric community forum. Also thank you @Ashish_Excel , @danextian , @sevenhills , @burakkaragoz for your inputs.
Since the date which you provided is bit confusing so could you please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Thank you.
Hi @Sudip_J ,
Can you please confirm whether you have resolved issue. If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi,
Try these measures
S = sum(Data[sales])
Max S = MAXX(generate(all(Data[State]),all(Data[City])),[S])
Drag the econd one to a card visual.
Hope this helps.
@ Ashish_Excel
I would like to thanks for helping to solve this problem but unfortunately it is not working as expected . I want each state wise city best sales(max_sales).
I am attaching the the solution results in the below-
Thanks & Regards,
Sudeep Kumar
I am very confused about what you want. Share the download link of the PBI file and show the expected result there very clearly.
Hi @Sudip_J
In order to get the max sales evaluated for each distinct city and state, create a virtual table in a measure and from that pickup the max
Max City Sales Measure =
-- Calculate the maximum sales value per state and city
MAXX (
-- Generate a summary table with state, city, and the sum of sales for each group
SUMMARIZECOLUMNS (
'table'[state], -- Group by 'state'
'table'[city], -- Group by 'city'
"@sales", -- Create a new column named '@sales'
[sum of sales measure] -- Use the [sum of sales measure] as the value for '@sales'
),
[@sales] -- Return the maximum '@sales' value from the summary table
)
Hi @Sudip_J ,
If you're trying to highlight or filter the table to show only the city (or cities) with the max sales, matching what's shown in the card (22.64K), then you'll need a bit more than just ALLEXCEPT.
Try this approach:
Max Sales = MAX ( Table[Sales] )
Is Max City =
IF (
Table[Sales] = [Max Sales],
1,
0
)Let me know if you're using a different visual setup or if the sales are coming from a more complex model.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI
@burakkaragoz
I would like to thanks for helping to solve this problem but unfortunately it is not working as expected.
Thanks and Regards,
Sudeep Kumar
How about this?
max by city =
CALCULATE (
MAXX (
DISTINCT ( 'Table'[City] ),
CALCULATE ( SUM ( 'Table'[Sales] ) )
),
ALLSELECTED ( 'Table' )
)
@sevenhills
I would like to thanks for helping to solve this problem but unfortunately it is not working as expected . I am attaching the the solution results in the below-
Thanks & Regards,
Sudeep Kumar
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 49 | |
| 40 | |
| 37 | |
| 14 | |
| 13 |
| User | Count |
|---|---|
| 85 | |
| 70 | |
| 37 | |
| 28 | |
| 27 |