March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
Hello,
I need help to construct a matrix on powerbi, so here is what i need to do
I did put the calculated value on the row but i don't know how to have a column with last year or how to have last_year/current_year
Here is the result i got for the moment https://i.imgur.com/wdVNkuv.png .
Any advice would be great!
Regards
Solved! Go to Solution.
I didn't find any solution so i choose to make 3 table, one for units, one for sales , and one for average price .
Hi, @oupepasa
Is your problem been solved?
From the data you gave, I can't see how to get the following results. Can you explain it?
Best Regards
Janey Guo
I didn't find any solution so i choose to make 3 table, one for units, one for sales , and one for average price .
@oupepasa in this case you can create seperate measures for each year like below and then measure for variance
2020A = calculate(sum(vol), year='2020')
2021A = calculate(sum(vol), year='2021')
%var = 2021A/2020A-1
if you face challenge in creating measure, do write back.
Proud to be a Super User!
Thanks for your answer, but what do you mean by (vol), if you mean the quantity, it will not works for the turnover or the average price.
Regards
SK_BillingDate QuantityInvoiced SalesPrice
20210912 1.00000 4600.00000
20210912 1.00000 500.00000
20210912 1.00000 1598.00000
20210912 1.00000 5699.00000
20190910 1.00000 23.22000
20190911 1.00000 10750.00000
20190911 1.00000 7200.00000
20200911 1.00000 1575.00000
20200911 1.00000 507.00000
20200911 10.00000 16.30000
In fact all i need for the first 2 column and the %var is that and a date dimension.
i need to calculate for the third line (sales on quantity) but i don't see what i have to put on my measure for my column as all my line are already calculated measure.
In fact i don't think, i can do all, because after that i have to add the budget that is not in the same fact table
@oupepasa it does not matter, you can add a seperate budget table in the model. As long as your budgt table has date field, you can have the matrix that you wish to have.
1 this is your data. I have added date column using SK_billingdate
2. then i create date table like below
3. Now link your tables like below. same way you can add your budget table and link with date table.
4. create measure to calculate avg billing qty
Proud to be a Super User!
Thanks a lot for your effort, i didn't explain well because i have a filter for the month and year that i didn't told you about, so how should i put the column 2020 with sameperiodlastyear?
And mostly with a table budget same structure than the sales , how do you add a budget column on this matrix ?i can't see how it would fit with the value from the sales table
@oupepasa I have added a dummy budget table with only selling price. You can have similar table in your dataset as well and link it with the date table.
Your model view would be like below. I have added few measure which are not being used in the final visual. You can keep or remove them
Below is the visual that you wish to have. It is not exactly the same but might do the job for you.
Finally, i am sharing updated pbix file for you. You can make changes and use accordingly in your dataset.
Proud to be a Super User!
Thanks so much for your work, can you confirm me the visual i was looking for isn't possible?
can you give me some advice on the change i would need , because i totally struggle here
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |