The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
Please, I need help.
I have a table with day, channel and revenue and I want to increase the revenue in a percentage depending on the month and the channel.
For example, I have this table and I need to estimate a new revenue when the channels are A or B, but for june I have to multiply by 110% and for july by 120%:
I need to get the revenue estimated column.
First I have created a new condicional column with "1" when it's july and "0" when it's june.
After that I have created two new measures, one for June and one for July:
Now I need to create a new measure combining both, but I don't Know how to do it (I have tried to make it with IF but it gave me an error).
Maybe it's better to do it differently but I don't Know if I can use "calculate" and "IF" in the same DAX.
Any idea? Any help would be greatly appreciated.
Thank you so much for your help!
Best regards
Yolanda
Solved! Go to Solution.
Hi,
How about:
Estimated Revenue =
SUMX (
'Revenue by channel',
IF (
'Revenue by channel'[Channel] IN { "A", "B" },
[Revenue Total]
* IF ( 'Revenue by channel'[June/July] = 0, 1.1, 1.2 )
)
)
Regards
You're welcome!
Cheers
Hi,
How about:
Estimated Revenue =
SUMX (
'Revenue by channel',
IF (
'Revenue by channel'[Channel] IN { "A", "B" },
[Revenue Total]
* IF ( 'Revenue by channel'[June/July] = 0, 1.1, 1.2 )
)
)
Regards
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |