In this Microsoft Power Bi tutorial, we will learn how to calculate Power BI Dax Min Date minus a particular period in Power BI.
In a recent Power Bi project, I had to calculate the minimum date values using the Power BI Min function, Also covered below topics:
- Power BI DAX min date minus 1 day
- Power BI DAX min date minus 1 year
- Power BI DAX min date minus 1 month
- Power BI DAX min date minus days
- Power BI DAX min date minus 6 months
Power BI DAX min date minus 1 day
Let us see how we can calculate the minimum date minus 1 day using the Power Bi Min function.
In this example, we will find the minimum date value of the existing car’s table date column later we will minus 1 day from the min date value.
- Open the Power Bi desktop, and load the data into the desktop. Once the data has been loaded, select the new measure option from the ribbon under the Home tab and apply the below-mentioned formula to find the minimum date value.
MinDate = MIN(Cars[Released Date])
Where,
- MinDate= New Measure name
- Released Date = Existing column name
- Cars = Table Name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane.
- In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the card visually displays the minimum date value as ( 12/17/2020).
Now, in the same way, select the new measure option from the ribbon under the Home tab and apply the below-mentioned formula to find the minimum date value minus 1 day.
MinDate = MIN(Cars[Released Date])-1
Where,
- MinDate= New Measure name
- Cars = Table Name
- Released Date = Existing column name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane.
- In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the new card visually displays the expected value as (12/16/2020) whereas, the minimum value is ( 12/17/2020).
This is how to calculate the minimum date minus 1 day using the Power Bi Min function.
Read Power BI DAX Min Date Validation
Power BI DAX min date minus 1 year
Let us see how we can calculate the minimum date minus 1 year using the Power Bi Min function in Power Bi,
In this example, we will find the minimum year value of the existing table date column later we will minus 1 year from the min year value.
- Open the Power Bi desktop, and load the data into the desktop. Once the data has been loaded, select the new measure option from the ribbon under the Home tab and apply the below-mentioned formula to find the minimum year value.
MinYear = CALCULATE(YEAR(MIN(Cars[Released Date])))
Where,
- Min Year = New Measure name
- Cars = Table Name
- Released Date = Existing column name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane.
- In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the card visually displays the minimum year value as (2020).
Now, in the same way, select the new measure option from the ribbon under the Home tab and apply the below-mentioned formula to find the minimum year value minus 1 year.
MinYearMinus1 = CALCULATE(YEAR(MIN(Cars[Released Date]))-1)
Where,
- MinDateMinus1 = New Measure name
- Released Date = Existing column name
- Cars = Table Name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane. In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the card visually displays the expected value as 2019 whereas the minimum year value is 2020.
This is how to calculate the minimum date minus 1 year using the Power Bi Min function in Power Bi.
Check Out: Power Bi Dax Today() function
Power BI DAX min date minus 1 month
Let us see how we can calculate the minimum date minus 1 month using the Power Bi Min function in Power Bi,
In this example, we will find the minimum month value of the existing table date column later we will minus 1 month from the min month value.
- Open the Power Bi desktop, and load the data into the desktop. Once the data has been loaded, select the new measure option from the ribbon under the Home tab and apply the below-mentioned formula to find the minimum month value which displays the minimum date month value.
MinMonth = CALCULATE(MONTH(MIN(Cars[Released Date])))
Where,
- Min Month= New Measure name
- Released Date = Existing column name
- Cars = Table Name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane. In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the card visually displays the minimum month value as (12) based on the minimum date value.
Similarly, create another measured value to calculate the min date month minus 1 month using the Power Bi Min function in Power Bi.
MinMonthMinus1 = CALCULATE(MONTH(MIN(Cars[Released Date]))-1)
Where,
- Min MonthMinus1 = New Measure name
- Released Date = Existing column name
- Cars = Table Name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane. In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the card visually displays the expected value as 11 whereas the minimum date month value is 12.
This is how to calculate the minimum date minus 1 month using the Power Bi Min function in Power Bi.
Power BI DAX min date minus days
Here we will see how we can calculate the minimum date and minus x – days using the Power Bi Min function in Power Bi,
In this example, we will minus 3 days from the minimum date value using the Min function in Power BI.
- Load the data into the Power Bi desktop. Once the data has been loaded, select the new measure option from the ribbon under the Home tab and apply the below-mentioned formula to find the minimum date value.
MinDate = MIN(Cars[Released Date])
Where,
- MinDate= New Measure name
- Released Date = Existing column name
- Cars = Table Name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane.
- In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the card visually displays the minimum date value as ( 12/17/2020).
Now to minus x days, create a new measure and apply the below formula here we will minus 3 days from the minimum date value.
MinDateMinus3 = MIN(Cars[Released Date])-3
Where,
- Released Date = Existing column name
- MinDateMinus3 = New Measure name
- Cars = Table Name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane. In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the card visually displays the date value as 12/14/2020 by minus 3 days from the minimum date value.
This is how to calculate the minimum date and minus x – days using the Power Bi Min function in Power Bi.
Read Power BI Matrix Multiple Column
Power BI DAX min date minus 6 months
Let us see how we can minus 6 months from the minimum date value using the Power Bi Min function in Power Bi.
In this example, we will find the minimum month value of the existing table date column later we will minus 6 months from the min month value.
- Open the Power Bi desktop, and load the data into the desktop. Once the data has been loaded, select the new measure option from the ribbon under the Home tab and apply the below-mentioned formula to find the minimum month value which displays the minimum date month value.
MinMonth = CALCULATE(MONTH(MIN(Cars[Released Date])))
Where,
- Min Month= New Measure name
- Released Date = Existing column name
- Cars = Table Name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane. In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the card visually displays the minimum month value as (12) based on the minimum date value.
Similarly, create another measured value to calculate the min date month minus 6 months using the Power Bi Min function in Power Bi.
MinMonthMinus6 = CALCULATE(MONTH(MIN(Cars[Released Date]))-6)
Where,
- Min MonthMinus6 = New Measure name
- Released Date = Existing column name
- Cars = Table Name
- Month = Function Name
- Now in the report section, select the Table visual and Card Visualfrom the visualization
- In the Table Visual, drag and drop the Car Name, Car Model, and Released date fields from the field pane. In the Card Visual, drag and drop the created measure value in it.
- In the below screenshot, we can see that the card visually displays the expected value as 6 whereas the minimum date month value is 12.
This is how to minus 6 months from the minimum date value using the Power Bi Min function in Power Bi.
This Power BI tutorial explained how to easily calculate the Minimum date values from the table data and minus dates for the mentioned period. Also, we covered these topics below:
- Power BI DAX min date minus 1 day
- Power BI DAX min date minus 1 year
- Power BI DAX min date minus 1 month
- Power BI DAX min date minus days
- Power BI DAX min date minus 6 months
You may like the following Power Bi tutorials:
- Power BI Sum Multiple columns
- Power BI Bookmarks
- Stacked Bar Chart in Power BI
- Power bi change color based on value
- Clustered Column Chart in Power BI
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com