Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I need to calculate the last quarter and current quarter for this year to be shown in CARD visual. Quarter starts from April to March which will be fiscal year. Data has the value since last year May (2023) to till date. When I try to take the current quarter (April, May (2024)), its provides the data of just May month (38%) which is very worrying for me. Request your help on this.
For E:G, based on the data mentioned below my previous quarter should be(Jan to Mar) 39%
Current quarter should be(April-May) 34%.
Note: If its move to another quarter(July to Sep) it will have to pick the data automatically and show it.
I have the calendar table which I have created fiscal year, Quarter, Month Name, Month separately.
Store Id | Store Name | NewAdoption | TxnDt |
1 | AA | 0% | 05-May-24 |
2 | BB | 80% | 05-May-24 |
3 | CC | 82% | 05-May-24 |
4 | DD | 56% | 05-May-24 |
5 | EE | 92% | 05-May-24 |
6 | FF | 0% | 05-May-24 |
7 | GG | 6% | 05-May-24 |
8 | HHH | 51% | 05-May-24 |
9 | AAA | 39% | 05-May-24 |
10 | BBB | 0% | 05-May-24 |
11 | AAA | 78% | 05-May-24 |
12 | AAAA | 28% | 05-May-24 |
13 | AAAAA | 16% | 05-May-24 |
14 | BBBBB | 2% | 05-May-24 |
1 | AA | 0% | 01-Apr-24 |
2 | BB | 80% | 01-Apr-24 |
3 | CC | 82% | 01-Apr-24 |
4 | DD | 56% | 01-Apr-24 |
5 | EE | 92% | 01-Apr-24 |
6 | FF | 0% | 08-Apr-24 |
7 | GG | 6% | 08-Apr-24 |
8 | HHH | 0% | 08-Apr-24 |
9 | AAA | 39% | 08-Apr-24 |
10 | BBB | 0% | 08-Apr-24 |
11 | AAA | 0% | 08-Apr-24 |
12 | AAAA | 28% | 15-Apr-24 |
13 | AAAAA | 16% | 15-Apr-24 |
14 | BBBBB | 14% | 15-Apr-24 |
1 | AA | 0% | 01-Jan-24 |
2 | BB | 80% | 08-Jan-24 |
3 | CC | 82% | 10-Jan-24 |
4 | DD | 56% | 21-Jan-24 |
5 | EE | 92% | 01-Feb-24 |
6 | FF | 0% | 08-Feb-24 |
7 | GG | 6% | 11-Feb-24 |
8 | HHH | 51% | 13-Feb-24 |
9 | AAA | 39% | 01-Mar-24 |
10 | BBB | 0% | 02-Mar-24 |
11 | AAA | 78% | 03-Mar-24 |
12 | AAAA | 28% | 04-Mar-24 |
13 | AAAAA | 16% | 05-Mar-24 |
14 | BBBBB | 14% | 06-Mar-24 |
Solved! Go to Solution.
Hi @Krishna_Newuser ,
First of all, many thanks to for your very quick and effective replies.
Based on my testing, please try the following methods:
1.Create the simple table.
2.Create the new measure to calculate current sales.
Current quarter =
var quart_ = QUARTER(TODAY())
//SELECTEDVALUE('Table quarter'[Quart])
VAR current_rows = CALCULATE(COUNTROWS('Table'), FILTER('Table', 'Table'[Quarter] = quart_))
VAR current_adop = CALCULATE(SUM('Table'[NewAdoption]), FILTER('Table', 'Table'[Quarter] = quart_))
var result = DIVIDE(current_adop, current_rows)
RETURN
FORMAT(result, "0%")
//result
3.Create the new measure to calculate forcast sales.
Lat quarter =
var quart_ = QUARTER(TODAY())
//SELECTEDVALUE('Table quarter'[Quart])
VAR last_rows = CALCULATE(COUNTROWS('Table'), FILTER('Table', 'Table'[Quarter] = (quart_ - 1)))
VAR last_adop = CALCULATE(SUM('Table'[NewAdoption]), FILTER('Table', 'Table'[Quarter] = (quart_ - 1)))
var result = DIVIDE(last_adop, last_rows)
RETURN
IF(quart_ = 1, BLANK(), FORMAT(result, "0%"))
4.Drag two measure into the card visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Krishna_Newuser ,
First of all, many thanks to for your very quick and effective replies.
Based on my testing, please try the following methods:
1.Create the simple table.
2.Create the new measure to calculate current sales.
Current quarter =
var quart_ = QUARTER(TODAY())
//SELECTEDVALUE('Table quarter'[Quart])
VAR current_rows = CALCULATE(COUNTROWS('Table'), FILTER('Table', 'Table'[Quarter] = quart_))
VAR current_adop = CALCULATE(SUM('Table'[NewAdoption]), FILTER('Table', 'Table'[Quarter] = quart_))
var result = DIVIDE(current_adop, current_rows)
RETURN
FORMAT(result, "0%")
//result
3.Create the new measure to calculate forcast sales.
Lat quarter =
var quart_ = QUARTER(TODAY())
//SELECTEDVALUE('Table quarter'[Quart])
VAR last_rows = CALCULATE(COUNTROWS('Table'), FILTER('Table', 'Table'[Quarter] = (quart_ - 1)))
VAR last_adop = CALCULATE(SUM('Table'[NewAdoption]), FILTER('Table', 'Table'[Quarter] = (quart_ - 1)))
var result = DIVIDE(last_adop, last_rows)
RETURN
IF(quart_ = 1, BLANK(), FORMAT(result, "0%"))
4.Drag two measure into the card visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much, this helps
look at this post, I found it beside your post in the recommendations. You will need to create a quarter column, then two measures for your current and previous quarter results.
https://community.fabric.microsoft.com/t5/Desktop/Current-Quarter-and-last-quarter-calculation/m-p/7...
User | Count |
---|---|
85 | |
74 | |
71 | |
68 | |
56 |
User | Count |
---|---|
98 | |
96 | |
92 | |
78 | |
70 |