Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi There,
I'm very new to Power BI and DAX. I currently have this DAX
Solved! Go to Solution.
Try with following
GrossWithCosts (Station Net) = SUMX ( VALUES ( 'Data'[StationShortName] ), VAR thisProduct = 'Data'[StationShortName] VAR thisFactor = SWITCH ( TRUE (), thisProduct = "Station1", 0.33, thisProduct = "Station2", 0.2, 1 ) RETURN CALCULATE ( SUM ( 'Data'[GrossWithCosts] ) * thisFactor ) )
Try with following
GrossWithCosts (Station Net) = SUMX ( VALUES ( 'Data'[StationShortName] ), VAR thisProduct = 'Data'[StationShortName] VAR thisFactor = SWITCH ( TRUE (), thisProduct = "Station1", 0.33, thisProduct = "Station2", 0.2, 1 ) RETURN CALCULATE ( SUM ( 'Data'[GrossWithCosts] ) * thisFactor ) )
I have a further factor to add to this DAX.
Station1 remains as below.
I also need to include IF Year = 2019 or greater then Station 2 is multiplied by 0.2
AND if year = 2018 then Station2 is multiplied by 0.18
AND if year is 2017 or less then Station2 is multipled by 0.4
my year field is in a seperate Calendar table
is this possible?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
107 | |
70 | |
70 | |
43 |
User | Count |
---|---|
148 | |
106 | |
104 | |
89 | |
65 |