Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am trying to compare conversion rates when exchanging from one country to another. I have column Country as the rows and columns of my Matrix as shown below, and I am trying to populate it with a measure which is the percentage difference in coversion accross countries.
My measure =
Solved! Go to Solution.
HI @arsalaan,
You can try to modify the allselected to all to ignore the filter effects:
measure formula =
VAR currCountry =
VALUES ( LOCATION_ADJUSTMENT_CON[Country] )
VAR newCountry =
VALUES ( NewTable[Country] )
VAR value1 =
CALCULATE (
SUM ( LOCATION_ADJUSTMENT_CON[Index] ),
FILTER (
ALL ( LOCATION_ADJUSTMENT_CON ),
LOCATION_ADJUSTMENT_CON[Country] IN currCountry
)
)
VAR value2 =
CALCULATE (
SUM ( LOCATION_ADJUSTMENT_CON[Index] ),
FILTER (
ALL ( LOCATION_ADJUSTMENT_CON ),
LOCATION_ADJUSTMENT_CON[Country] IN newCountry
)
)
RETURN
value1 / value2
If these also don't help, can you please share a pbix or some dummy data that keep the raw data structure? They wil help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
HI @arsalaan,
AFIAK, current power bi does not support to get different values from the same source table field at the same time.
In my opinion, I'd like to suggest you create a new unconnected table with all country values, then you can use this field with raw table country as row and column to design the matrix.
NewTable =
DISTINCT ( ALL ( LOCATION_ADJUSTMENT_CON[Country] ) )
measure formula =
VAR currCountry =
VALUES ( LOCATION_ADJUSTMENT_CON[Country] )
VAR newCountry =
VALUES ( NewTable[Country] )
VAR value1 =
CALCULATE (
SUM ( LOCATION_ADJUSTMENT_CON[Index] ),
FILTER (
ALLSELECTED ( LOCATION_ADJUSTMENT_CON ),
LOCATION_ADJUSTMENT_CON[Country] IN currCountry
)
)
VAR value2 =
CALCULATE (
SUM ( LOCATION_ADJUSTMENT_CON[Index] ),
FILTER (
ALLSELECTED ( LOCATION_ADJUSTMENT_CON ),
LOCATION_ADJUSTMENT_CON[Country] IN newCountry
)
)
RETURN
value1 / value2
Regards,
Xiaoxin Sheng
Hey, do you think you can help me out? Really frustrating problem
HI @arsalaan,
You can try to modify the allselected to all to ignore the filter effects:
measure formula =
VAR currCountry =
VALUES ( LOCATION_ADJUSTMENT_CON[Country] )
VAR newCountry =
VALUES ( NewTable[Country] )
VAR value1 =
CALCULATE (
SUM ( LOCATION_ADJUSTMENT_CON[Index] ),
FILTER (
ALL ( LOCATION_ADJUSTMENT_CON ),
LOCATION_ADJUSTMENT_CON[Country] IN currCountry
)
)
VAR value2 =
CALCULATE (
SUM ( LOCATION_ADJUSTMENT_CON[Index] ),
FILTER (
ALL ( LOCATION_ADJUSTMENT_CON ),
LOCATION_ADJUSTMENT_CON[Country] IN newCountry
)
)
RETURN
value1 / value2
If these also don't help, can you please share a pbix or some dummy data that keep the raw data structure? They wil help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Tried this way too, does not work
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |