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
Miave
Regular Visitor

DAX formula issue? Sales this week number (calculated column) not equal to actual sales number

Miave_0-1702982889431.png

Seeking some help please. the calulated column (MRR created this week) has totally different value vs actual MRR (green column). Please advise if there is something wrong with DAX? Much appreciated any great help and advice. Thank you.

4 REPLIES 4
v-nuoc-msft
Community Support
Community Support

Hi @Miave 

 

I understand that your question is Sales this week number (calculated column) not equal to actual sales number.

 

Here's a table I created based on your screenshots

vnuocmsft_0-1703055918808.png

 

Here are the modifications I've made to your dax:

vnuocmsft_1-1703055938479.png

MRR Created This week = CALCULATE(SUM(APAC_MidMarket_fromSFDC[Opportunity Gross MRR(converted)]),
 FILTER(ALL(APAC_MidMarket_fromSFDC), [WeekNumber] = MAX([WeekNumber])))

 

Here is the result

vnuocmsft_2-1703055967565.png

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Best Regards,

Nono Chen

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

 

Miave_0-1703066626541.png

Hi @v-nuoc-msft , 

Thanks for looking into my issue. I follow your modified DAX unfortunately i didn't get the same outcome. Meanwhile, I notice in your result screenshot, the "weeknumber" are not in sequence and the value on "Created last week" seems get impacted as well. Please advise how to fix. Thank you very much.

Hi @Miave 

 

For your question I looked into it again, if you want “MRR Created This week” to be equal to “Opportunity Gross MRR(converted)”, you can try the way:

 

If you want to choose to create a measure:

vnuocmsft_0-1703208037761.png

MRR Created This week = SUM('APAC_MidMarket_fromSFDC'[Opportunity Gross MRR(converted)])

 

If you want to choose to create a calculated column:

vnuocmsft_1-1703208091950.png

MRR Created This week = [Opportunity Gross MRR(converted)]

 

Regarding your question about "WeekNumber" not being sorted in order and "MRR Created Last Week" being affected, since the "MRR Created This week" column is sorted from highest to lowest, the order of the two columns is changed.

The column can be reordered by clicking on "WeekNumber".

vnuocmsft_2-1703208127938.png

 

Again, I have a question for you:

I don't know what the "WeekRank" you use does with the results you want.

And if there is a relationship between your tables that has the potential to invalidate the dax. This could be the reason why you are not getting the results you want

vnuocmsft_3-1703208148298.png

 

Best Regards,

Nono Chen

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

 

 

Hi @v-nuoc-msft ,

 

First of all, my sincere apology for late response as I was out of office during holiday season. I just return to work today 🙂

Thank you so much for your feedback and advice.

 

Actually, i followed some tutorial videos to create DAX in order to look at how much MRR value created this week/ last week.  And by looking at these 2 figures, we can compare the growth% (+ve or -ve), i.e. week over week growth.

 

It explains why i have to create "week rank" calculated column to "rank" the week numbers based on the "Created date".

You suggested this measure which gives this week MRR however it doesn't give last week's. 

MRR Created This week = SUM('APAC_MidMarket_fromSFDC'[Opportunity Gross MRR(converted)])

 

As you see the red line i highlight in this screenshot, the "MRR this week" is the same as "MRR last week" in the subsequent week.  With that we are able to calcucate MRR WoW (week over week) change.

Miave_0-1704190336405.png

I can share you the tutorial video i learned from social media if required. The instructor also validated the steps and the value are match. I followed exactly the steps and DAX however i couldn't get the same result.  Hope it provides you more information and context of what i am trying to achieve. Please advise. Thank you

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.