Forum Discussion
Using Sumproduct for timestamps - please help!
I am trying to use this sumproduct formula from Excel in my PowerBI report, but it is giving me an error that DAX comparisons don't support values of type Text with values of type Number. I am trying to compare start timestamps and stop timestamps and see if there is any overlap. The formula from Excel is "=SUMPRODUCT((A2<enddate)*(B2>=startdate))>1" and returns True or False. I have tried using SumX in its place and that's when I get an error to use the VALUE or FORMAT function to convert the value but I want it to stay as a timestamp.
How come Excel is smart enough to see the data as a date type and calculate it but PowerBI cannot? Or am I missing something?
Any help is appreciated. Thanks!
One issue is that it appears your dates are stored as text.
5 Replies
- Nathaniel_CCommunity Champion
Hi shhush
Not sure what you are trying to do in Power BI, if you would share your pbix, or dummy up some values in Excel both for current and expected data. Please copy and paste them into your post, rather than doing a picture, we may be able to help you.
Please read this post to get your question answered more quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Nathaniel- shhushFrequent Visitor
I have attached a sample .pix file here. I have two tables - one with clock ins/outs from one system, and another with clock ins/outs from another system. I'd like to see if there are any overlapping times. I have combined the tables to see if I could create a measure that would let me know if there are other date/times that are overlapping, but need some guidance.
- Nathaniel_CCommunity Champion
One issue is that it appears your dates are stored as text.