cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

I don't get any options...

4ErrorPBI.png

Highlighted
Super User VII
Super User VII

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

@Gjakova bizzare, is datum column is date type when you selected Mark as date table  , did you used datum as a column for a date? Can you share the screenshot of mastercalendar table with all the columns showing in field pane, datum icon should look different compare to others, which shows it is marked as a date.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Helper IV
Helper IV

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

I managed to solve it!

Old format: 

Last Month = CALCULATE ( [This Week], DATEADD( MasterCalendar[Datum], -1, MONTH ) )

New format: 

Last Month = CALCULATE ( [This Week], DATEADD( MasterCalendar[Datum], -1, ,MONTH ) )
 
So I just had to add a , before MONTH and DAY 😥
Highlighted
Super User VII
Super User VII

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

@Gjakova can we do a screen sharing to take a look it? I'm bit lost.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Helper IV
Helper IV

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

Hi there, it is already late on the other side of the world for screen sharing, but I appreciate the help!

Eventually your measure was correct, the only thing that was missing was a , before MONTH and before DAY.

Solution: ,DAY instead of DAY and ,MONTH instead of MONTH.
Maybe the Power BI settings are different in other regions of the world? Anyhow, thanks a lot for the measurement. Just one more question: why did I had to unipivot all the info except for ID, would it otherwise not have worked? (The thing you mentioned in your 2nd or 3rd post here).

 

Thanks a lot!

Highlighted
Super User VII
Super User VII

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

@Gjakova oh ok, not sure why but comma was always there. Anyhow glad it is working. We did unpivot so that with few measures we can work on all the fuel categories, otherwise, we need to write measures for each column (each category) and that would have been 3 categories x 3 columns = 9 measures and also it is not scalable,  and best practice. You cannot even filter if you had 3 columns and now can easily filter. Not sure if this answered your question but if you have any further questions, I can gladly explain.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

Highlighted
Helper IV
Helper IV

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

@parry2k here are some extra screenshots for a clarification of what I adjusted to make it work:
solution2.pngsolution1.png

Kudos are welcome if it gave you some clarification 😛

Highlighted
Helper IV
Helper IV

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

Ah I did not know that! Thanks a lot. So it is better to have more rows than columns? Or is that just the case when you want to create measures?

Highlighted
Super User VII
Super User VII

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

@Gjakova basic rule:

 

facts on which you do the calculations, usually are long and thin

dimension by which you measure facts, can be wide 

 

if it makes sense. Anyhow, that comma thing is bizarre for me but I'm going to sleep over it for now. We already spent a lot of time on it and I'm glad it is working for you. Cheers!!






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Helper IV
Helper IV

Re: This week price avg. vs last week avg. & this month price avg. vs last month price avg [HOW?

Thanks for the tip! Yeah it is bizarre, we spent a lot of time on just a , 
Anyways cheers!

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors