cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sdg8481 Frequent Visitor
Frequent Visitor

A Table showing the total for a chosen weeknumber but also YTD and Previous YTD

Hi, Sorry this might be a very simple question but i just can't figure out a solution, Please bare with me as i'm fairly new to Power BI.

 

Basically, i have a table that contains a date, measure and value. I have also built a date table with is joined by Date and contains Week Number.

 

What i am trying to do is to create a single table that for each measure will show;

-  total for a chosen week number (as selected by the user)

  - total for the same week number last year

  - a total value for the current year upto and including the week number selected

  - a total value for the prior year upto and including the week number selected

 

*by year i mean financial year which runs from July-June.

 

I just can't figure it out, because i can get the TotalYTD formulas working, but obviosuly then when the user chooses a week number it limits the results to just that week.

 

any help or advise would be greatly appreciated.

 

Thanks

Stu

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: A Table showing the total for a chosen weeknumber but also YTD and Previous YTD

@Sdg8481,

 

Try using ALLSELECTED Function instead.

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

Re: A Table showing the total for a chosen weeknumber but also YTD and Previous YTD

@Sdg8481,

 

You may take a look at the following links.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Sdg8481 Frequent Visitor
Frequent Visitor

Re: A Table showing the total for a chosen weeknumber but also YTD and Previous YTD

Thank you very much for these links, however i'm struggling to apply these to my issue. However, i have applied the

following, which seems to work.

 

Measure = CALCULATE(Sum('0 - Measureables'[Value]),(FILTER(ALL('0 - Measureables'),'0 - Measureables'[Date]<=(MAX('0 - Measureables'[Date])))))

 

HOWEVER, this completely ignores the 'Product Name' slicer (i assume because its referencng ALL). How can i adapt this so that the product name slicer is still filtered. Therefore giving a total for All previous dates for the chosen product name too.

 

I'm just stuck

 

Sdg8481 Frequent Visitor
Frequent Visitor

Re: A Table showing the total for a chosen weeknumber but also YTD and Previous YTD

Thank you very much for these links, however i'm struggling to apply these to my issue. However, i have applied the

following, which seems to work.

 

Measure = CALCULATE(Sum('0 - Measureables'[Value]),(FILTER(ALL('0 - Measureables'),'0 - Measureables'[Date]<=(MAX('0 - Measureables'[Date])))))

 

HOWEVER, this completely ignores the 'Product Name' slicer (i assume because its referencng ALL). How can i adapt this so that the product name slicer is still filtered. Therefore giving a total for All previous dates for the chosen product name too.

 

I'm just stuck

 

Community Support Team
Community Support Team

Re: A Table showing the total for a chosen weeknumber but also YTD and Previous YTD

@Sdg8481,

 

Try using ALLSELECTED Function instead.

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

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 111 members 1,691 guests
Please welcome our newest community members: