The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a Time field =IC_HistoryProducts[Time]
And a Date field= IC_HistoryProducts[TransactionDate]
What I need is to subtract 1 day from the date field if the time field is between 12AM~2AM
This is driving me nuts and could use some help
Solved! Go to Solution.
What does this do:
newcolumn = if(hour(IC_HistoryProducts[Time])<2, previousday(IC_HistoryProducts[TransactionDate]),IC_HistoryProducts[TransactionDate])
Hi,
Try
new column = IF([Timecolumn]>12:00AM,IF([Timecolumn]<2:00AM,DATEADD([datecolumn],-1,date),[datecolumn])
I am not sure if this is it so let me know if it works.
What does this do:
newcolumn = if(hour(IC_HistoryProducts[Time])<2, previousday(IC_HistoryProducts[TransactionDate]),IC_HistoryProducts[TransactionDate])
| User | Count |
|---|---|
| 15 | |
| 8 | |
| 6 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 23 | |
| 14 | |
| 13 | |
| 8 | |
| 8 |