Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi im trying to create a measure that display data from last 3 months but only from yesterday in current month.
Let say we have the total budget for jan - mar like this:
What i need the measure to display it like this:
I have worked with this measure but it is summarizing everything in march:
CALCULATE(SUM(P_Plan_Ras[Plan_Kton]), CALENDAR(DATE(YEAR(TODAY()) - 3,MONTH(TODAY()),DAY(TODAY())),TODAY())
Thanks
Petter
Solved! Go to Solution.
Hi,
Please correct me if I wrongly understood.
Please try the below.
The link to the pbix file is down below.
https://drive.google.com/file/d/18vb0hhFwyK2lt8fkCMchgClU0W5MhKaC/view?usp=sharing
Hope it resolves your issue?
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos, Press the thumbs up button!!
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi @Petter120
I have another idea to use visual-level filters to realize the same goal. Suppose your budget data is based on daily data like below and have data in multiple years. You can add a column YearMonth in the table to use in filters and measures later.
Create a measure Flag to determine whether a month is in last three months. If it is, return the result 1.
Flag =
VAR _startDate = EOMONTH(TODAY(),-3)+1
VAR _startYearMonth = YEAR(_startDate)*100+MONTH(_startDate)
VAR _currentYearMonth = YEAR(TODAY())*100+MONTH(TODAY())
RETURN
IF(SELECTEDVALUE('Table'[YearMonth])>=_startYearMonth && SELECTEDVALUE('Table'[YearMonth])<=_currentYearMonth, 1)
Put Month and Budget columns into the table as values, and add two fields Date and Flag into its visual-level filters. Filter the Date with Relative date in the last 3 months (not include today) and filter the Flag is 1.
Kindly let me know if this helps.
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
Hi @Petter120
I have another idea to use visual-level filters to realize the same goal. Suppose your budget data is based on daily data like below and have data in multiple years. You can add a column YearMonth in the table to use in filters and measures later.
Create a measure Flag to determine whether a month is in last three months. If it is, return the result 1.
Flag =
VAR _startDate = EOMONTH(TODAY(),-3)+1
VAR _startYearMonth = YEAR(_startDate)*100+MONTH(_startDate)
VAR _currentYearMonth = YEAR(TODAY())*100+MONTH(TODAY())
RETURN
IF(SELECTEDVALUE('Table'[YearMonth])>=_startYearMonth && SELECTEDVALUE('Table'[YearMonth])<=_currentYearMonth, 1)
Put Month and Budget columns into the table as values, and add two fields Date and Flag into its visual-level filters. Filter the Date with Relative date in the last 3 months (not include today) and filter the Flag is 1.
Kindly let me know if this helps.
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
This way works as well 🙂
Hi,
Please correct me if I wrongly understood.
Please try the below.
The link to the pbix file is down below.
https://drive.google.com/file/d/18vb0hhFwyK2lt8fkCMchgClU0W5MhKaC/view?usp=sharing
Hope it resolves your issue?
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos, Press the thumbs up button!!
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you works fine 🙂
User | Count |
---|---|
103 | |
87 | |
77 | |
70 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |