Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everybody,
i've a problem with a sub-total of a calculated matrix. I'm starting to say that my english is not so good, so please be patient.
I have a quantity, an average price and an import about the current year.
I want to convert only one category with azienda_id=84 (third row) from dollars to euros. The other two category are already in euros.
So i create a calculated metric, Imp CY:
IF(MAX(VIEW_PBI_AVGI[AZIENDA_ID]) = "84", VALUE(VIEW_PBI_AVGI[Imp_Base CY] / 1.18), VALUE(VIEW_PBI_AVGI[Imp_Base CY]))
How may you see, the sub-total is wronged and i don't understand the problem.
Each single row is correct, only the third row are correctly converted, while the first and second row are not converted.
The sub-total, in this case, is the sum of all rows, but each row is converted, not only the third!
Why? I really don't understand.
Thank you for the support.
Solved! Go to Solution.
Hi,
Please try the below.
If it does not work, please share your sample pbix file, and then I can try to look into it to come up with accurate solution.
New measure: =
SUMX (
VALUES ( tablename[Qty CY] ),
CALCULATE (
IF (
MAX ( VIEW_PBI_AVGI[AZIENDA_ID] ) = "84",
VALUE ( VIEW_PBI_AVGI[Imp_Base CY] / 1.18 ),
VALUE ( VIEW_PBI_AVGI[Imp_Base CY] )
)
)
)
Hi,
Please try the below.
If it does not work, please share your sample pbix file, and then I can try to look into it to come up with accurate solution.
New measure: =
SUMX (
VALUES ( tablename[Qty CY] ),
CALCULATE (
IF (
MAX ( VIEW_PBI_AVGI[AZIENDA_ID] ) = "84",
VALUE ( VIEW_PBI_AVGI[Imp_Base CY] / 1.18 ),
VALUE ( VIEW_PBI_AVGI[Imp_Base CY] )
)
)
)
Thank you so much, SUMX function save me!
@Anonymous
Change "84" to just 84 since it is a number data type . You will get your result ! Share your Kudos!
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |