Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Analitika
Post Prodigy
Post Prodigy

Error in measure in Power BI

Hello,

 

I would like to ask how I could fix this issue in measure

The MIN function only accepts a column reference as the argument number 1.

 

20_2_1_DATA PRADELSIMAS = 
VAR SlicerDate =
    MAX ( 'Date'[Date] )
VAR pradzia =
    CALCULATE (
        MIN ([dm]),
        FILTER ( ALL ( 'Date'[Date] ), 'Date'[Date] <= SlicerDate )
    )
VAR pradelstos_dienos =
    DATEDIFF ( pradzia, SlicerDate, DAY )
RETURN
    IF (
        ABS ( [18_1_0_BENDRA SKOLA (nuo istorijos pradzios)] ) > 0.01,
        CALCULATE ( pradelstos_dienos, FILTER ( 'Date', 'Date'[Date] <= SlicerDate ) )
    )

 

Here measure. I am using measure in min function.

8 REPLIES 8
NaveenGandhi
Super User
Super User

Hello @Analitika 

Min function will only accept column as input, If you want to to use a measure, try the below change.

Minx('Table Name',[dm])

Note that this might give you wong numbers due to the fact that you haven't given a explanation and sample data on what you are trying to achieve.

 

Let me know if this helps!

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Analitika_0-1686062162591.png

dm=values(date)

@Analitika 

You can use the min(date) in this scenario.

Main problem is whenever I add date column in table visual, then resources exceeded. And table didn't load.

@Analitika 

Can you explain a bit more about what you are trying to achieve and what is the problem you are facing along with some screenshots and sample data?


My problem is whenever I try to add date column visual table, then getting resources exceeded, and table are not viewable. I can't find how to optimize something in order to put additional column in table. I tried use measure for table but it didn't help too.

@Analitika 

It would be better if you explain on what is the no of tables, table size ,how does the data model look like.

It is just table visual.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.