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.
I'd like to create a new measure that will calculate all the data from a column row of a table based on 1 criteria.
if (Harvest_Year) = 2019 then "2018 carryover" else 0
keep getting minumium argument for If function is 2
Hey,
if you are creating the "custom" column inside the Power Query than the syntax has to be
if [Harvest_Year] = 2019 then "2018 carryover" else 0
if use DAX to create a "calculated column" maybe this will provide additional information:
https://docs.microsoft.com/en-us/dax/if-function-dax
Regards,
Tom
Thanks for the reponse. This is what I am trying to do in with DAX
Measure 4 = if(all(Project_Table[Harvest Year]="2019",Project_Table[2018 Carry Over],Project_Table[2018 Carry Over]="0"))
I am trying to caluclate the column 2018 Carryover only if the year 2019 is selected
Hi @sverderame,
It could be this one below. If not, please provide a sample without sensitive data.
Measure 4 = IF ( SELECTEDVALUE ( Project_Table[Harvest Year] ) = 2019, Project_Table[2018 Carry Over], 0 )
Best Regards,
For some reason I can't get these suggestions to work. I want to select year "2019" (row 3) using a slicer filter and bring back the value "20" in (row 2) year "2018"
Hi,
If there isn't already, create a Date column (from seperate Year and Month columns) in the base data table. Create a Calendar Table with running dates. Build a relationship from the Date column of your base data table to the Date column of your Calendar Table. In the Calendar Table, extract the Year in another column Year=Year(Calendar[Date]). In your slicer visual, drag the Year from the Calendar table and select 2019. Write these measure and drag the second one to your card visual
Total savings = SUM(Data[Savings])
Total savings in the previous year = CALCULATE([Total Savings],PREVIOUSYEAR(Calendar[Date]))
Hope this helps.
=IF(Harvest_Year=2019;"2018 carryover";0)
but man, this is a simple syntax error, look it up on documentation.
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 |
---|---|
111 | |
96 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |