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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How to manually edit within a New Table I created

Hi there.

 

So i've googled this and the answer isn't jumping out at me. 

 

I created a CALENDARAUTO() table from Modelling ? New Table.

I then added a WorkDay column which uses a formula to work out the weekdays identifying them as a one or a zero.

However it counts national holidays such as Christmas and Easter as a working day. I simply want to be able to edit the WorkDay column.

 

My Calendar does not appear under Edit Queries (I guess it's not a query, it's just a table) so I don't know if or how I can adjust what's in there. 

 

Jemma

 

1 ACCEPTED SOLUTION
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

Based on my test, you could use the IF function in the dax to solve your problem, if the 2018/1/1 is the the date you want to edit, you could create a new calculated column and use below formula:

Column = IF('Table'[Date]=DATE(2018,1,1),"Hollday","Not Holiday")

Result:

1.PNG

Reference:https://msdn.microsoft.com/en-us/query-bi/dax/if-function-dax

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

Based on my test, you could use the IF function in the dax to solve your problem, if the 2018/1/1 is the the date you want to edit, you could create a new calculated column and use below formula:

Column = IF('Table'[Date]=DATE(2018,1,1),"Hollday","Not Holiday")

Result:

1.PNG

Reference:https://msdn.microsoft.com/en-us/query-bi/dax/if-function-dax

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Daniel you clever thing you. I will absolutely do this!!!

 

Thanks!!!

luxpbi
Helper V
Helper V

Hi @Anonymous,

 

Just select a column of the table and the code will appear in the DAX box (don't really know hoy to call it)

 

Regards.

Anonymous
Not applicable

Hi Luxpbi,

 

I don't want to edit the code... I want to actuall select a cell in the table and change the value. I wonder if I can manually add the holidays into the formula instead, so like an if(25 december 2018, 0, else... then do the calculation. 

Sorry my bad, I didn't understood you well enought. 

You can't modify a cell but you can do it with code. 

 

Here is one of the best solutions there is: 
SQLBI Working Days

Edit:
You can also download the calendar template and check how it's done:
Calendar template

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.