Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Calculate with dates and filtes

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%:

 

Yolema_0-1627640500846.png

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:

 

Yolema_1-1627640982201.png

 

Yolema_2-1627641012987.png

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

 

 

 

 

1 ACCEPTED SOLUTION
Jos_Woolley
Solution Sage
Solution Sage

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Jos_Woolley 

 

Thank you very much for your answer, it works!

 

Best regards

You're welcome!

 

Cheers

Jos_Woolley
Solution Sage
Solution Sage

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.