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
RvdHeijden
Post Prodigy
Post Prodigy

HELP !! with changing my formula

I need to change my formula so that is works with BLANK values

 

Productie per dag = SUMMARIZE(GENERATE(Adressen;CALCULATETABLE(VALUES('Date'[Date]);DATESBETWEEN('Date'[Date];Taken[begin];Taken[Eind])));Adressen[DP gebied naam];'date'[Date])

 

It has effect on the 'red' part of the formula which calculates the Datesbetween 2 colums and sometimes there is no value.

Now ... it returns an error translated into 'A single value cannot be determined for column 'Begin' in table 'Taken' 

 

Which probably has something to do with the fact that there are blank values right ?

5 REPLIES 5
Greg_Deckler
Super User
Super User

Might be, or it might be that if that is a measure that you need an aggregation around that column. If it is blank, what do you want it to be?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Decklerif there is a blank value the formula should return a blank value too

You can handle that via something like:

 

IF(ISBLANK(MAX('Table'[BeginTime])),BLANK(),<your calculation>)


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler i cant get the formula to work but not such a datanaut as you are 😉

 

Productie per dag = SUMMARIZE(GENERATE(Adressen;CALCULATETABLE

(VALUES('Date'[Date]);(IF(ISBLANK(MAX(Taken[begin]));BLANK());DATESBETWEEN('Date'[Date];Taken[begin];Taken[Eind])));Adressen[DP gebied naam];'date'[Date])))

 

it returns a syntax error so that probably means there are some )( wrong somewhere, can you help me out ?

@Greg_Deckler Any ideas ?

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.