Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am pulling in sales data in Power BI Desktop. Besides some other identifiers, the data includes one of three possible vendors (e.g. 'Vendor A', 'Vendor B', 'Vendor C') and the respective date (on a daily basis) the data is from. I now want to display this information on one of my sheets, e.g. I somehow want to show the earliest date and the latest date of available data for each vendor, allowing my users to know in which range they can work.
I found another thread on this forum with a similar request, but everything mentioned there exceeds my current knowledge of Power BI, so I am not able to verify whether this would work for my needs. If the solution in this other thread is the one I should be using, could anyone help me out with a few additional steps to get this running? If I need to do something else, could you point me in the right direction?
Thank you very much for your help!
Solved! Go to Solution.
You could create a couple of measures as
Earliest Date = CALCULATE( MIN('Table'[Date]) )
Latest Date = CALCULATE( MAX('Table'[Date]))
If you include those in a visual with the Vendor column then it should work I think
You could create a couple of measures as
Earliest Date = CALCULATE( MIN('Table'[Date]) )
Latest Date = CALCULATE( MAX('Table'[Date]))
If you include those in a visual with the Vendor column then it should work I think
Oh wow, thank you so much, @johnt75. I just created a new table in Power BI with the Vendor column and the measures and it works perfectly.
This might be a trivial question, but at the moment, the dates are formated in a way that includes the time as well (which is always 00:00:00, as it is not specified in the source). Is there a way to get rid of this via formatting in Power BI, or is that something that needs to be changed in the source?
you can change the column type from datetime to date, you can also change the format to be long dat, short date etc.
I think the option I am looking for is the change of the column type. Could you point me to the place where I can find this?
You can either do it in Power Query by clicking on the little calendar icon with a clock on it, in the column header, or you can do it in Power BI desktop. Select the column, choose column tools from the top menu and data type is in there.
Power Query is probably the best place to do it.
Thank you again, that was definitely helpful. I also found that it is possible to change the format the measure calculates, I think in my case, the error was there.