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.
DIVISION | VENTE NETTE | POID_VENTES | RESULT | RESULT2 | |
AL | 50465.37 | 63354 | 504.6537 | 504.6537 | |
CD | 15338.91 | 19582 | 153.3891 | 153.3891 | |
HT | 447 | 472 | 4.47 | 11.8 | |
WR | 176210.8 | 265607 | 1762.108 | 1762.108 | |
NP | 153402.89 | 294308 | 1534.0289 | 1534.0289 | |
VM | 1482.56 | 728 | 14.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) |
Solved! Go to Solution.
@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
@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
Thanks a lot. In the future I shall be more detailed. Again, thanks!
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?
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
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
8 | |
8 |