Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I am trying to calculate the Total Sales Rev where I have these columns
Currentfiscalmonth = True or False
CurrentFiscalyear = True or False
Fiscalmonth = 1 - 12
now what I want to do is to get current month number for this fiscal year and then minus it one to get last month and then sum the total sales how can I accomplish that?
Hi @arasshh ,
1. If you want to create last month total sales, you can create a calendar date table first and create a relationship between it and the fact table.
Calendar = CALENDARAUTO()
2. To create the measure to get the amount of the previous month.
Last month sales =
CALCULATE(
SUM('Table'[Sales]),
PREVIOUSMONTH('Calendar'[Date])
)
Here is the sample file that hopes to help you, please try it: Last month sales.pbix
If not help, could you please consider providing some sample data and expected output for further discussion?
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
@v-yingjl thank you for the answer!
I'm working on company data and we already have calendar, the thing is that it's fiscal calendar which is different from the calendar year.
so I can't use date functions. the columns I have, the ones I mentioned in my message.
I'm trying to return the previous fiscal month/this number using the currentmonth column (which is True or False ) !
@v-yingjl thanks for the reply!
I am working on the company data and we already have calendar, the thing is it is fiscal calendar which is different from calendar year.
so I cannot use date functions. the columns I have, to work with are the ones I mentioned in my message.
I am trying to return the previous/this fiscal month number using currentmonth column ( which is True or False ) !
Hey @arasshh
You could use the following for the % change in sales from last month to current month
User | Count |
---|---|
124 | |
106 | |
99 | |
63 | |
59 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |