March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
hi,
how to calculate the previous 6 months' sale by selecting a month from the slicer.
if I select November then the visual will show June to November sale
if I select august then the visual will show march to august sale
thanks
Solved! Go to Solution.
Sorry, it is my mistake. actually i am considering the end of month for the start date and didnt consider the entire month. for eg. if i select Sep-2021 it takes the 30-Apr-2021 as a start date but it should be 01-Apr-2021.
So, can you please correct the Start_Date measure as below,
Hi @abc_777
Create Measure for Last 6 month # Last 6 Month sales = CALCULATE(SUM(Data[ Sales]), DATESINPERIOD('Data'[Date],MAX(Data[Date]),-6,MONTH))
Hi @abc_777 ,
Please find the below steps,
Month_Year Slicer is from "Date Dim1" table
hi @Aburar_123 ,
thanks for your help,
I have done what you have showen. I have a global date calendar and a date dim2 calendar
but i when I select a specific month form table slicer it shows me that specific month only not the 6 months from that selected month. i give you my measure and other that you showen are just global calendar and creating column only. would be able to share me your pbi sample file so I can closelly look the issue on my side
As Salamualykum,
I would love to share but this is company data. and so it would be good if I and you can set time and you do a remote login to my computer and check. What country are you from. we can communicate via email if you wish to. and find a suitable time for us
Hi @abc_777 , did you try with that flag measure. it should work fine if you use it
Hi @Aburar_123 ,
As Salamualykum,
Sorry, I don't get your point what if flag measure. I m a bit new on power bi. so your help is really appriciable. and as i said you are welcome to do anydesk to my machine. thanks for your help aburar
I had given you the below measure to use. Can you please follow the below steps,
Please create the below measure and place it in the visual leve filter,
As Salamualykum Aburar,
yes now working. is there any way i can hide flag measure? in your pbi file its hidden and as i said i am still in the learning stage if you suggest to me how to hide flat measure then will be grateful
thank you so much,
just place this flag measure only in the visual filter means directly drag and drop in the visaul filter. dont use it in the table visual
Thanks, Aburar,
see I don't know lots of think in pbi. hope one day I will learn. yes, now it's working.
I hope this would be my last query regarding this issue.
See in a measure my first-month data is not coming correct.
April data is not correct. even when starting month is may that time may data not correct. what would be the reason? this should be 31128 KG
even in your visual you will see starting month data is not correct. it shows less.
Sorry, it is my mistake. actually i am considering the end of month for the start date and didnt consider the entire month. for eg. if i select Sep-2021 it takes the 30-Apr-2021 as a start date but it should be 01-Apr-2021.
So, can you please correct the Start_Date measure as below,
wow,
really working what i wanted thank you so much aburar.
thank you for your effot.
I have done some mistakes so results not comming. that why want to see your pbi file to correct it
Hi,
See if my solution here helps - Flex a Pivot Table to show data for x months ended a certain user defined month.
Hi @abc_777 ,
I dont find the option to attach the Pbix file 🙂
Please check the below points,
1. Date Dim1 table should be independant table. it should not have any relation with any table.
2. Date slicer should be from 'Date Dim1'.
Hi @Aburar_123 ,
I have seen the pbi you sent. thank you so much
I have done excatly what to you did
I have measure like this
even my filter not working when i select month slicer. do you have time to do anydesk and see what is the actualy issue.
But i have the year 1900 how can i filter them
see i select March 2020 but the filter not working. I check the relation there is no wrong.
@abc_777 , Please create the below measure and place it in the visual leve filter,
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |