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.
Hi All,
I have two fields (one "Revenue" and the other "WeightedAmt"), both of which have a relationship to a MonthEnd date field as per tables below.
I want to create a conditional measure that will return the Revenue field for all months incl last calendar month before today, but will return the WeightedAmt field for the current calendar month and future months.
Any help would be appreciated.
Solved! Go to Solution.
calculate(sum(Table[Revenue]), filter(Date, Date[Date]<=eomonth(today(),-1) ) )
or
calculate(sum(Table[Revenue]), filter(all(Date), Date[Date]<=eomonth(today(),-1) ) ) // use allselected if needed
for WeightedAmt
calculate(sum(Table[WeightedAmt ]), filter(Date, Date[Date]> eomonth(today(),-1) ) )
or
calculate(sum(Table[WeightedAmt ]), filter(all(Date), Date[Date]> eomonth(today(),-1) ) ) // use allselected if needed
calculate(sum(Table[Revenue]), filter(Date, Date[Date]<=eomonth(today(),-1) ) )
or
calculate(sum(Table[Revenue]), filter(all(Date), Date[Date]<=eomonth(today(),-1) ) ) // use allselected if needed
for WeightedAmt
calculate(sum(Table[WeightedAmt ]), filter(Date, Date[Date]> eomonth(today(),-1) ) )
or
calculate(sum(Table[WeightedAmt ]), filter(all(Date), Date[Date]> eomonth(today(),-1) ) ) // use allselected if needed