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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.