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
Anonymous
Not applicable

About not being able to remove date types with the ALL function.

I'm having trouble removing the date type with the ALL function when using the ADDCULUMN function.

In the table below, the ALL function can remove the "category" column, but not the "day" column.

(However, you can remove it by putting the table in the ALL function.)

Therefore, you can remove it by changing the day column to text type.

If you don't use the ADDCULUMN function, even date types will work.

However, it is necessary because I want to have a table expression in the measure.

Please tell me the cause and solution.

 

Thank you.

 

source table

f_999_2-1642583082460.png

 

It doesn't work if the "day" column is date type.(but,you can remove it by putting the table in the ALL function.)

f_999_0-1642582738095.png

 

you can remove it by changing the day column to text type.

f_999_3-1642583540085.png

 

And If you don't use the ADDCULUMN function, even date types will work.

f_999_4-1642583805966.png

 

 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

This is related with auto date time, that for each date columns create a new date table (that you don't see) (check this video with an explanation) in this case when you make the calculation for the Day based on date what is happening is that he is creating a new date table and making the calculation based on that, that is why you don't get the expected result.

 

If you rephrase the calculation to this has you can see the result is correct:

MFelix_0-1642776295992.png

If turn off the auto date time and use your calculation will work properly:

 

MFelix_1-1642776780103.png

Has you can see the day does not have the calendar icon meaning the auto date is off.

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @Anonymous ,

 

This is related with auto date time, that for each date columns create a new date table (that you don't see) (check this video with an explanation) in this case when you make the calculation for the Day based on date what is happening is that he is creating a new date table and making the calculation based on that, that is why you don't get the expected result.

 

If you rephrase the calculation to this has you can see the result is correct:

MFelix_0-1642776295992.png

If turn off the auto date time and use your calculation will work properly:

 

MFelix_1-1642776780103.png

Has you can see the day does not have the calendar icon meaning the auto date is off.

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

thank you for your reply
I didn't know this.
It's a big help.
I also learned about the selectculums function for the first time.
Thank you!

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.