Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello everyone.
I'm new to this power bi and dax thing and I need your help.
I have a record that contains thousands of products, each with its price and category (the category is divided into three levels in another table)
In addition, I have the date on which each of the records has been made.
I need a way to calculate and compare the evolution of prices over time (by months for example), both individually and by categories.
For example, see which are the categories/prices that have risen the most in price in the last year, or the ones that have risen the least. They have risen from one month to the next...
A small example of the table can be something like this.
| Product | Price | Category | Date | |
| AAA | 5.3 | A | 01/01/2022 | |
| FIG | 8.2 | A | 05/02/2022 | |
| BBB | 1.1 | B | 01/01/2022 | |
| CCC | 5.3 | C | 23/05/2022 | |
| CHAPTER | 0.2 | B | 04/12/2022 | |
| DDD | 2.7 | A | 03/03/2022 | |
| GGG | 10.1 | C | 14/02/2022 | |
| HGT | 20.3 | C | 23/08/2022 | |
| AAA | 5.4 | A | 11/01/2022 | |
| CCC | 6.1 | C | 17/09/2022 | |
| BBB | 1.1 | B | 01/01/2022 | |
| DDD | .3.1 | A | 08/03/2022 | |
| GGG | 9.1 | C | 29/03/2022 |
I imagine that we will have to calculate the average price of the category for the month in question, which is what I do not know how to do it.
I do not know if I have explained myself well or if it is necessary to clarify something.
Thanks a lot
Solved! Go to Solution.
Hi @Syndicate_Admin ,
If you want to calculate the average price of the category for the month, you can create a Dimdate table by CALENDAR()/CALENDARAUTO() function. Then create a measure by average function.
Data model:
Measure:
Avg =
AVERAGE('Table'[Price])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
If you want to calculate the average price of the category for the month, you can create a Dimdate table by CALENDAR()/CALENDARAUTO() function. Then create a measure by average function.
Data model:
Measure:
Avg =
AVERAGE('Table'[Price])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |