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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
KenMann
Regular Visitor

Mark table as date table issue

Hi guys,

 

In my Fabric Dataset, I have a dimDate table which coming from a csv file, and after looking at the content, it does not have a column with Date type. 

 

As I'm using this dataset in Power BI Desktop, so I tried to solve this by create new column to table by using function DATE(year, month, day), give the column name "Date"

 

So when I have this new column "Date", I think I can mark my table as date table. Although it is validated sucessfully I received this error ->

KenMann_0-1701455567690.png

and this after click "Ok"

KenMann_1-1701455837495.png

 

 

After googling, found this "old" thread in this forum as well -> https://community.fabric.microsoft.com/t5/Desktop/Not-able-to-click-OK-in-Mark-as-date-table-dialogu...

which mentioned that we need to switch the storage mode to Dual. First of all, am I right to say this is mean Mixed mode ?

 

But actually my model already Mixed, although the Date table it self is "DirectQuery" and it looks like I cannot change it.

KenMann_2-1701455894170.png  

KenMann_3-1701455996937.png

 

May I know how to solve this ?

 

Thanks.

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @KenMann 

The calculated column is based on other columns, so it cannnot be set as a primary key, but you can refer to the following soution.

Create a calcualted table, use the date calculated column you have created.

e.g

Table=Summarize('Dates',[Date])

Then you can set this [Date] column of the new table as a Date table, it can work. and you can refer to the following attachments.

vxinruzhumsft_0-1701930767759.png

Best Regards!

Yolo Zhu

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

2 REPLIES 2
v-xinruzhu-msft
Community Support
Community Support

Hi @KenMann 

The calculated column is based on other columns, so it cannnot be set as a primary key, but you can refer to the following soution.

Create a calcualted table, use the date calculated column you have created.

e.g

Table=Summarize('Dates',[Date])

Then you can set this [Date] column of the new table as a Date table, it can work. and you can refer to the following attachments.

vxinruzhumsft_0-1701930767759.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Syndicate_Admin
Administrator
Administrator

Create your date column in Power Query, not in DAX.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors