cancel
Showing results for
Did you mean:
New Member

## Create metric with same value based on specific row

Dear PBI community,

In the picture below, I have a column with sum of total sales for all countries. I would like to add a NEW metric (for example Total Sales of USA) which will have value of United States sales on all rows. Consequently, I would create ANOTHER NEW metric and divide (result will be in %) column Total Sales of USA by column Total Sales. How am I able to achieve it with DAX?

Thanks a lot for your help, I have gone through some forum threads but I could not find answer for this specific challenge.

1 ACCEPTED SOLUTION
Community Support

Hi @ElistheFox ,

If so, please create a measure based on the [usa sales].

``measure=maxx(all(Sales Territory),[usa sales])``

If it still does not help, please provide more details with your desired output and pbix file without privacy information.

Best Regards

Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Community Support

Hi @ElistheFox ,

If so, please create a measure based on the [usa sales].

``measure=maxx(all(Sales Territory),[usa sales])``

If it still does not help, please provide more details with your desired output and pbix file without privacy information.

Best Regards

Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Frequent Visitor

Thanks for your reply, however, it does not work. If I apply your formula, I will get result only on row with United States. But I need to see the same result on all rows. I´ve even tried to delete all filters but still, no progress.

Super User

This is such a basic thing to do in DAX that I don't believe you couldn't find it on the forum or even on YT. But nevertheless...

``````[USA Sales] =
CALCULATE(
[Total Sales],
'Sales Territory'[Sales Territory Country] = "usa"
)``````

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### 2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors