Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hi all,
I'm using USERELATIONSHIP in a formula with dates and I need to substitute year of selected dates with previous year.
Dates are used a slicer on the page with yerarchy Year/Quarter/Month.
My current formula is this:
Any suggestion?
Thanls
Solved! Go to Solution.
@ax80 , Try like. Keep USERELATIONSHIP inside
CALCULATE( CALCULATE(SUM(Table[Amount]);
USERELATIONSHIP('Date'[Date];Table[Document date])) ,DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
or
CALCULATE(CALCULATE(SUM(Table[Amount]);
USERELATIONSHIP('Date'[Date];Table[Document date])),previousyear('Date'[Date]))
Try this:
CALCULATE(CALCULATE(SUM(Table[Amount]);
USERELATIONSHIP('Date'[Date];Table[Document date])),
@ax80 , Try like. Keep USERELATIONSHIP inside
CALCULATE( CALCULATE(SUM(Table[Amount]);
USERELATIONSHIP('Date'[Date];Table[Document date])) ,DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
or
CALCULATE(CALCULATE(SUM(Table[Amount]);
USERELATIONSHIP('Date'[Date];Table[Document date])),previousyear('Date'[Date]))
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!