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
Hi,
The ultimate goal i have is to update the "Daily rate" page in the pbix model attached here, as in the picture below - ie insert the black lines and the red lines which are the yearly and the quarterly daily rates. Achieving this goal, i was thinking i need a measure for yearly average and quarterly average, hence the workaround below.
This is what i need:
This is what i currently have:
Trying to get the sum of the year on every period in a matrix, where the field for the Period and Year are not part of the data table, but of the calendar table. I am able to get the right data using the fields ("Period" / "Year") in the Data Table (see below the right hand side), but i need to link it to Calendar table ("Fiscal Period" / " Fiscal Year") as there i have various ways of presenting the data (ie "Jan 2020") (left hand side below image). Calendar table and Data table are joined via a Bridge table (which may cause the issue...?) using column "Period Qtr Year".
You'll find the formulas i was using in the pbix. I need the right formulas for "Value FY repeat" and "Value QTR repeat", and hopefully, i could use those 2 measures in the Daily rate chart to represent the yearly and the quarterly averages as in the first picture above.
As i cannot attached the pbix model, you can download it from here https://easyupload.io/o1qif7 - password is demopbix.
Related topics (below) i tried without succes but don't think those solutions work as they don't have 2 tables, but only one data table:
https://community.powerbi.com/t5/Desktop/Repeat-result-sum-on-all-rows/m-p/2577331
You'll find 2 data tables ("Data Orders & Sales Demo" and "Data All Demo"). I need both as i have pages linked to both data sources. For tis exercise, we only use data from "Data All Demo" table. You will also notice a lot of measures with errors, that's because i deleted the real tables and replaced them with demo ones.
Any help is appreciated, as i was spending too much time on this already and could not afford any more unfortunately.
Many thanks in advance!
Solved! Go to Solution.
Many thanks you for the solution @PiEye !
Your proposed formulas were not exactly what i needed, but i player around a bit on them and i found the right ones.
For Full Year this is what worked for me (i had to add " 'Dim Calendar' " to the "ALL()" expression):
Value FY repeat 6 =
CALCULATE(
[Value All Data k$ MTD Demo Daily],
all('Dim Calendar'),
'Dim Calendar'[Fiscal Year] = SELECTEDVALUE('Dim Calendar'[Fiscal Year])
)
For QTR same (i had to add " 'Dim Calendar'[Fiscal Period] " to the "ALL()" expression):
Value QTR repeat 7 =
CALCULATE(
[Value All Data k$ MTD Demo Daily],
all('Dim Calendar'[Fiscal Period]),
'Dim Calendar'[Fiscal Quarter] = SELECTEDVALUE('Dim Calendar'[Fiscal Quarter])
)
I have now the same values on the absolute numbers which i could then divide to get the right Daily numbers.
Many thanks you for the solution @PiEye !
Your proposed formulas were not exactly what i needed, but i player around a bit on them and i found the right ones.
For Full Year this is what worked for me (i had to add " 'Dim Calendar' " to the "ALL()" expression):
Value FY repeat 6 =
CALCULATE(
[Value All Data k$ MTD Demo Daily],
all('Dim Calendar'),
'Dim Calendar'[Fiscal Year] = SELECTEDVALUE('Dim Calendar'[Fiscal Year])
)
For QTR same (i had to add " 'Dim Calendar'[Fiscal Period] " to the "ALL()" expression):
Value QTR repeat 7 =
CALCULATE(
[Value All Data k$ MTD Demo Daily],
all('Dim Calendar'[Fiscal Period]),
'Dim Calendar'[Fiscal Quarter] = SELECTEDVALUE('Dim Calendar'[Fiscal Quarter])
)
I have now the same values on the absolute numbers which i could then divide to get the right Daily numbers.
Hi @daniel_baciu , sure!
Can you open this link? https://drive.google.com/file/d/1eccjYD3Ushtie-pAEULjQTI743iQuPCS/view?usp=share_link
Pi
Hi @PiEye - no, i cannot, but i have requested it using the Request access button.
Have got the request & granted access. Let me know if you run into any more issues
Is this the sort of thing that you need?
Year total = CALCULATE([Value All Data k$ MTD Demo Daily],all(),'Dim Calendar'[Fiscal Year]=SELECTEDVALUE('Dim Calendar'[Fiscal Year]))
Qtr total = CALCULATE([Value All Data k$ MTD Demo Daily],all(),'Dim Calendar'[Fiscal Quarter]=SELECTEDVALUE('Dim Calendar'[Fiscal Quarter]))
These return the aggregation of [Value All Data k$ MTD Demo Daily] for the relevant year or quarter, even if this field is not in the same visual:-
Hi @PiEye ,
Many thanks for your input.
Can you also share your updated model? Trying to add a measure using your suggested formula is pointing an error in my model (A function 'SELECTEDVALUE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.)
Daniel
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |