Reply
Regular Visitor
Posts: 18
Registered: ‎12-26-2016

Formula working in Power BI but not in Power Pivot

Hi everybody!

 

My issue is simple: i have the next formula that works perfectly in Power BI:

 

    CALCULATE (
        MIN(DATES[Year-Week]),
        DATESINPERIOD(DATES[FECHA],TODAY(),-1 ,DAY),
        ALL ( DATES )
    )

When i try to use it in the same table but in Power Pivot, i get the next error (translated):

 

The MIN function accepts an argument whose evaluation is numbers or dates and can not work with values ​​of the String type.

 

Any ideas?


Thanks in advance!

Member
Posts: 83
Registered: ‎09-19-2015

Re: Formula working in Power BI but not in Power Pivot

Hi,

What the type of DATES[Year-Week] in PowerPivot? Check it.

Highlighted
Regular Visitor
Posts: 18
Registered: ‎12-26-2016

Re: Formula working in Power BI but not in Power Pivot

@popovboth columns are text. I’ve already fixed it by making a new column ‘year-week’ without the hyphen and making it a type ‘whole number’. Nevertheless it’s still strange that the same formula works in PBI but does not in PP...