Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Add 6 months to project start date and sum revenue during/outside those dates

Hi all,

 

I'm trying to show the end date of a particular project (always 6 months after start), based on whatever site the user selects. When no site is selected, the card should read "Select a site".

 

PricingProj Date.png

I thought this would work but it's telling me that multiple values were supplied:

PricProj Date +6 Mths = IF(ISFILTERED(MD_Sites[Site_Name]),
                            (DATEADD(MD_Sites[Pricing_Project_Date].[Date], +6, MONTH)),
                            "Select a Site")

 

 

I want to be able to calculate when a certain "treatment code" was used within the project dates and outside it - and what the value was for its usage inside the project dates and outside the project dates. Obviously this can only be done at an individual site level as each site has a different project start date (some also have no project start date).

 

This was my attempt at the sum:

 

 

Authorised 13D-25 Rev = 
VAR Pricing_Project_Date = CALCULATE(FIRSTDATE(MD_Sites[Pricing_Project_Date]))
VAR Pricing_project_6Mths = CALCULATE(DATEADD(MD_Sites[Pricing_Project_Date], +6, MONTH))
RETURN
CALCULATE(SUMX(REV_Revenue,REV_Revenue[Fee]),
                            FILTER(REV_Revenue,
                            REV_Revenue[TransactionDate] >= Pricing_Project_Date &&
                            REV_Revenue[TransactionDate] <= Pricing_project_6Mths
                            )
)

 

This is how my site table looks:


PricingProj SiteTable.png

 

My revenue table has line by line transactions with transaction date.

 

Any help would be much appreciated!

 

Kind regards,

Aaron

 

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

If I understand your scenario correctly that you want to create a measure and show with card visual.

Do you create the slicer with  MD_Sites[Site_Name] ?

Will you select the single item in the slicer or mutiple items in the slicer?

If it is convenient, could you share some data sample with table foramt which could reproduce your scenario so that we could copy and have a test on it?

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.