Last answered:

10 Dec 2021

Posted on:

10 Dec 2021

1

"MIN' VS "MINX" / "MAX" vs "MAXX"

Previous lesson we created dim_Date using <CALENDAR(MIN(fact_InternetSales[ShipDate]), MAX(fact_InternetSales[ShipDate]))> and in this lesson it was created using <CALENDAR(MINX(fact_InternetSalesfact_InternetSales[ShipDate]), MAXX(fact_InternetSalesfact_InternetSales[ShipDate])). What is the difference between them and under what conditions to know which to use?

1 answers ( 0 marked as helpful)
Instructor
Posted on:

10 Dec 2021

4

The two examples produce exactly the same results, the MINX and MAXX are iterator functions meaning that you can add more conditions to the min and max dates, i.e. you can increase the min day with +1, or one year extra, or push forward the max date. Generally, you are ok to use the MIN and MAX to create a calendar date table, but if you need to add a specific condition such as the end date to be 10 years after the max date you can achieve this easily with the X functions.

Submit an answer