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
Raul
Post Patron
Post Patron

How to design this data model?

Hello everybody,

I would like to know how I can design this  data model:

I have a table (Areas) that have this values for date year <=2017 (Area1, Area2, Area3) and this others values for date year >=2018 (Area1, Area2, Area4, Area5). I have another table (Invoices) with this fields: InvoiceNum, InvoiceDate, InvoiceAmount, Area and I want to compare amount values for a period, for example, actual year amount invoice versus previous year amount invoice just like that:

 

C1.JPG

 

The Amount previous year it's a measure wtih this formula:

=CALCULATE(SUM(Invoices[InvoiceAmount]), PREVIOUSYEAR(Invoices[InvoiceDate]))

 

And I have this data model:

C2.JPG

It is possible? How should the structure of the Areas table be? The Amount previous year measure is it correct?

Thank you very much.

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

Hi @Raul

Please have a look at my pbix, if you have any question, feel free to ask me.

 3.png

Best Regards

Maggie

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Raul

Please have a look at my pbix, if you have any question, feel free to ask me.

 3.png

Best Regards

Maggie

OMG! It's perfect!!!

Thank you very much @v-juanli-msft for your reponse and clear exemple. I will apply your model in mine and tell you if it worked as in your example.

Thanks a lot!

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.