Forum Discussion
undefined
- Anonymous7 years ago
Hey guys,
I solved it. Thank you for your time!
If anyone is curious - I was using calculated columns before so I was getting circular dependencies.
I used the measures -
Max Hour Logic = IF(Max hour <= Max time, "Y", "N")
2019 = IF((MAXX('Table','Table'[Ord_Date])=TODAY()),CALCULATE(SUMX('Table','Table'[demand]),'Table'[Max Hour logic]="Y"),CALCULATE(SUMX('Table','Table'[demand])))2018 = IF((maxx('Table','Table'[Ord_Date])<TODAY()),calculate(sumx('Table','Table'[LY $])),CALCULATE(sumx('Table','Table'[LY $]),'Table'[Max Hour Logic]="Y"))BGT = IF((maxX(''Table','Table'[Ord_Date])<Today()),CALCULATE(Sumx('Table',[Budget])),CALCULATE(Sumx('Table',[Budget]),'Table'[Max Hour Logic]="Y"))
So, I have figured out how to get the values with this logic for 2019 and BGt.
calculated columns -
2019 = IF( Ord_date = TODAY(), CALCULATE(SUM(Table, demand),Max_Hour_critera = "Y"),CALCULATE(SUM(Demand)))
BGT = IF( Maxx(Ord_Date < TODAY()),CALCULATE(SUMX(Budget)),CALCULATE(SUMX(BUDGET,Max_hour_criteria = "Y"))
Can't seem to figure out for 2018. I would be much obliged if you could help me for the same.
For 2018, I tried -
2018 = IF(Ord_date <> Today(), Calculate(SUM(LY $)), CALCULATE(SUM(LY $),MAx_Hour_Criteria = "Y"))
But I am getting circular dependency between 2018 and 2019 when I try to do that.