Forum Discussion
Help with measures by Month
Hello all!
I have a situation, I hope someone can help me with this doubt
I have a visual table in my report that show some columns like this:
I created a measure by Month using this sintaxis,
Hi Anonymous ,
In order to prevent the relationship between your date table and the fact table from having other uses, I created another date table with CALENDARAUTO() and used the month as a filter.
Create this measure and put it in the matrix:
_Amount = IF ( NOT ( ISFILTERED ( 'Date'[Year] ) ), BLANK (), IF ( ISFILTERED ( _Date[Date].[Month] ), CALCULATE ( SUM ( 'Table'[Amount] ), FILTER ( 'Table', MONTH ( 'Table'[Date] ) <= SELECTEDVALUE ( '_Date'[Date].[MonthNo] ) ) ), SUM ( 'Table'[Amount] ) ) )Attached the modified sample that you can refer: sample file.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years ago
Thanks a lot,
7 Replies
- AnonymousNot applicable
HI Anonymous
On your filter select as shown below and select Before.
Did I resolve your issue? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!!
Regards,
Pranit - Ashish_MathurSuper User
Hi,
You first need to Unpivot your dataset in the Query Editor to list all months in a single column. Thereafter, you may use the technique discussed here - Flex a Pivot Table to show data for x months ended a certain user defined month.
Hope this helps.
- v-yingjlCommunity Support
Hi Anonymous ,
You can create this control measure, put it in the visual filter and set its value as 1:
control = IF( SELECTEDVALUE('Date'[Date].[MonthNo]) >= SELECTEDVALUE('Table'[Date].[MonthNo]),1,0 )Attached a sample file that you can refer: sample.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hello,
Thanks for the comments,
I tried to do, but I cant show the information, when I select one month, the previous months dont show, I put in a page 2, the expect result, when I select a month in a filter, only show this month and not all the previous.
https://drive.google.com/file/d/14RiKAy_tRyaj19vat17NbPW1LekKQAnr/view?usp=sharing
Thanks again
Monica
- Ashish_MathurSuper User