Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I am trying to create a DAX measure to get the Percentage Change from Month to Month. Problem is I do not have a traditional Dates table, my Dates table is more like a String table with Dates.
Here is the visual i am trying to create:
-- The number of filings in here is a simple measure, and then I use a domension table to get the court names, and then i use my dates dimension (not really a dates table) to get the Year month
I want another column that has percentage change showing., but I cant use PREV MONTH syntax for the measure because my dates table is not marked Dates.
What I did in my dates table, I created a Index, so that at least I can Rank my row to get the dates in order:
Thanks
Solved! Go to Solution.
@pfarahani , Try like this example , Date here us your Month year table
This Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[index]=max('Date'[index])))
Last Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[index]=max('Date'[index])-1))
diff = [This Month]-[Last Month]
diff % = divide([This Month]-[Last Month],[Last Month])
@pfarahani , Try like this example , Date here us your Month year table
This Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[index]=max('Date'[index])))
Last Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[index]=max('Date'[index])-1))
diff = [This Month]-[Last Month]
diff % = divide([This Month]-[Last Month],[Last Month])
@amitchandak , worked out pretty nice i think, 1 small issue remains. Below is the chart, not bad, however my data ends with December 2019, but its still trying to calculate for the January 2020. Is their a solution using ISBLANK or an IF to stop after Dec 2019. thanks
@amitchandak I think I got something here,
I took the code you provided for diff% and modify to this:
User | Count |
---|---|
93 | |
83 | |
77 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |