Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello team,
I am new to Power BI DAX, and I wants to show the differerence between the amount of 1 quarter with another.
If suppose I select Q1 2021 and Q2 2021 from my Quarter slicer then results should come like below-
Product Description | Q1 2021 ($000) | Q2 2021 ($000) | $ Change ($000) | % Change |
A | $67,957 | $67,726 | ($231) | 0% |
B | $27,716 | $26,050 | ($1,666) | -6% |
C | $7,692 | $9,275 | $1,583 | 21% |
D | $6,974 | $7,863 | $888 | 13% |
Below is my sample data -
Product Name | QuarterYear | INVOICEDATE | ChargeAmount |
A | Q1 2021 | 2/28/2021 | 7126816.01 |
A | Q2 2021 | 5/31/2021 | 6054198.33 |
B | Q2 2021 | 4/30/2021 | 5879113.68 |
B | Q1 2021 | 1/31/2021 | 5293888.03 |
C | Q2 2021 | 6/30/2021 | 4904149.4 |
A | Q1 2021 | 3/31/2021 | 4372781.54 |
B | Q1 2021 | 1/5/2021 | 3754678.19 |
D | Q1 2021 | 3/29/2021 | 3577814.64 |
E | Q2 2021 | 6/29/2021 | 3286894.5 |
Any help is much appreciated...!
Hi @amitchandak ,
thanks for reply ..!
I tried the measure which you sent but it doesnt work for me. can you please create pbix file for the sample data which I sent in my 1st post and sent me that pbix file so that I can refer it in my desktop .
@vaibbandge , a measure like
Measure =
VAR _max = MAXX(allselected('Date1'),'Date1' [Qtr Year]) // prefer to have column Year Qtr in table and use that here, ui you can use Qtr Year
var _min = MinX(allselected('Date1'),'Date1' [Qtr Year])
return
calculate(sum(Table[value]), filter(('Date') , 'Date1' [Qtr Year] = _max )) - calculate(sum(Table[value]), filter(('Date') , 'Date1' [Qtr Year] =_min ))
I assumed use of date table
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |