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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
hongdao
New Member

InternetPreviousQuarterMargin:=CALCULATE([InternetTotalMargin], PREVIOUSQUARTER('DimDate'[Date]))

I am learning how to implement tabular models using the InternetSales dataset from AdventureWorksDW2019 through the link https://learn.microsoft.com/en-us/analysis-services/tutorial-tabular-1400/as-lesson-6-create-measure....

 

I followed the steps in the tutorial, but in Lesson 6: Create Measures, when I input the formula 'InternetPreviousQuarterMargin:=CALCULATE([InternetTotalMargin], PREVIOUSQUARTER('DimDate'[Date]))', the result for InternetPreviousQuarterMargin shows as blank.

 

I’ve checked the previous steps from the tutorial, but I haven’t been able to resolve the issue. I’m wondering if anyone else has faced this situation and can guide me on how to fix it. Thank you.

hongdao_0-1729017977043.pnghongdao_1-1729018010022.pnghongdao_2-1729018033595.pnghongdao_3-1729018125122.png

 

4 REPLIES 4
BeaBF
Memorable Member
Memorable Member

@hongdao Hi! 

Verify that the date column in the 'DimDate' table is set to the "Date" data type

 

BBF

I have already done it, but it still doesn't work

v-zhouwen-msft
Community Support
Community Support

Hi @hongdao ,

Regarding your question, you are using the time smart function, which requires consecutive and unique date columns. Make sure step 3 of the documentation is correct.

vzhouwenmsft_0-1729064385819.png

What is the specific expression for this metric? Which table is it calculated for? Depending on the direction in which the filter is passed, the date dimension table can only filter data from table 'FcatInternalSales'.

 

Best Regards,
Wenbin Zhou

 

 

I created the column InternetTotalMargin = SUM([Margin]), where the Margin column is calculated as [SalesAmount] - [TotalProductCost] in the FactInternetSales table

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors