The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have a date with Date Time Values. This DateTime is in IST time zone. I used DateTime.AddZone("Date Column Name", -6) to convert this to MST (Mountain Standard Time). But the resulting DateTime is not correct as you can see below.
Time is converted correctly but the Denver time for the given India time should be 1/3/2019 5:30 AM instead of 1/4/2019 5:30 AM. Why the date is 4th instead of 3rd?
Solved! Go to Solution.
Thank you so much for replying. I finally got the result by doing the below.
Hi kvijayrs173,
If you mean achieve the -6 hour switch datetime based on the local datetime, you can create a custom column using power query below:
= DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), -6, 0)
If you mean achieve the -6 hour switch datetime based on the india column, you may use power query below:
= [India Time] - #duration(0, 6, 0, 0)
You can also refer to the attached sample pbix file.
Regards,
Jimmy Tao
Thank you so much for replying. I finally got the result by doing the below.
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
27 |
User | Count |
---|---|
181 | |
88 | |
70 | |
48 | |
46 |