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
I have the below dataset and user country as a filter. The task is to calculate the revenue - calculated as sum paid in this month - sum paid in the previous month. It should be calculated in USD. The solution of multiplying the exchange rate in the below table, then, creating a measure using PREVIOUSMONTH and then, doing subtraction doesn't work because of the high exchange rate fluctuation.
The solution we came with was to calculate the revenue in the local currency. And then, if a user selects Switzerland from the filter, the revenue will be multiplied by the exchange rate for the corresponding country and corresponding date.
Here are the formulas in practice:
And it is working just fine when you select a particular country, however, I cannot a formula work when no country is selected. I've uploaded the sample at
https://drive.google.com/file/d/1ADLoDNSVBFo-G_SYj30xPH490yTDNXrL/view?usp=sharing.
My attempt to do the filter is in the measure final
Solved! Go to Solution.
Hi @ekaponkratova ,
To update your measure as below.
final_calc =
IF (
ISFILTERED ( Sheet1[country] ) = FALSE (),
CALCULATE (
SUM ( Sheet1[cum sum paid] ),
DATEADD ( 'calendar_3'[Date], -1, MONTH ),
Sheet1[country] = "Spain"
)
)
Hi @ekaponkratova ,
To update your measure as below.
final_calc =
IF (
ISFILTERED ( Sheet1[country] ) = FALSE (),
CALCULATE (
SUM ( Sheet1[cum sum paid] ),
DATEADD ( 'calendar_3'[Date], -1, MONTH ),
Sheet1[country] = "Spain"
)
)
@ekaponkratova - You'll want to do something like SUMX(YourTable[Raw Revenue]*ExchangeRates[Rate])
Because you need to calculate the value for each day and then sum them up.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |