Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have a data for sales in different category per month like below:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |
cat1 | 522 | 750 | 600 | 455 | 378 | 783 | 856 | 938 | 987 | 635 | 258 | 526 |
cat2 | 30 | 73 | 80 | 90 | 75 | 68 | 96 | 75 | 25 | 36 | 56 | 60 |
cat3 | 1000 | 1256 | 1325 | 996 | 1280 | 1255 | 1326 | 1378 | 1258 | 1459 | 965 | 1333 |
cat4 | 600 | 455 | 600 | 455 | 600 | 600 | 455 | 652 | 635 | 600 | 455 | 752 |
I want sum of the different number of columns based on today month No.
For Example. Today is Month 3 on year I want to Sum columns 4-12 but In month 4 want it to sum columns 5-12.
How can I write something that will only sum the data in my columns based on the Day Number?
@Mehdi20 , First Unpivot the month in power query
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
Then you will have month on rows
Create an independent month table
Month = distinct(Table[Month])
use that is slicer and have a measure like
measure =
var _max = maxx(allselected(Month),Month[Month])
return
calculate(Sum(Table[Value]), filter(Table, Table[Month]>= _max ))