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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

I am new to dax, coming from Excel

DIVISIONVENTE NETTEPOID_VENTESRESULT RESULT2
AL50465.3763354504.6537 504.6537
CD15338.9119582153.3891 153.3891
HT4474724.47 11.8
WR176210.82656071762.108 1762.108
NP153402.892943081534.0289 1534.0289
VM1482.5672814.8256 14.8256
      
The column "RESULT" simply calculates "VENTE NETTE" * 1/100 
Is it possible in DAX to obtain a different result for 1 of the items. 
In excel I would simply write '=IF(A2:A7="HT",C2:C7/100*2.5,B2:B7*1/100) 
1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

@Anonymous

Yes, I suggest next time you explain a bit more what you are showing 🙂. I understand now it is actually a table visual, with measures? And result2 is a measure too? Then:

 

Result2 =
IF (
    SELECTEDVALUE( Table1[DIVISION])  = "HT",
    [POID_VENTES] / 100 * 2.5,
    [VENTE NETTE] / 100
)

 

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

View solution in original post

4 REPLIES 4
AlB
Community Champion
Community Champion

@Anonymous

Yes, I suggest next time you explain a bit more what you are showing 🙂. I understand now it is actually a table visual, with measures? And result2 is a measure too? Then:

 

Result2 =
IF (
    SELECTEDVALUE( Table1[DIVISION])  = "HT",
    [POID_VENTES] / 100 * 2.5,
    [VENTE NETTE] / 100
)

 

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Anonymous
Not applicable

Thanks a lot. In the future I shall be more detailed. Again, thanks!

Anonymous
Not applicable

Thanks,
In the formula, "Division" is a column of a table but [Poid_Ventes] and [Ventes_Nette] are measures.
Somehow, the function "if" does not accept the Table1[Division]...it remains greyed!

Any suggestion?

AlB
Community Champion
Community Champion

Hi @Anonymous 

Result2 =
IF (
    Table1[DIVISION] = "HT",
    TAble1[POID_VENTES] / 100 * 2.5,
    Table1[VENTE NETTE] / 100
)

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors