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.
Hi Data Nuts!
I am having an issue I haven't been able to solve and am eliciting your assistance, any input would be greatly appreciated.
I have a Matrix that is showing correct past year when there is data in the current period, when there is not, it displays a blank instead of the data. (In my examples I have added + 0 to show the blanks as a zero).
Here are the Measures:
Hi @Anonymous ,
You can create column Year in table MergedReportData, and create calculated table Year dimension , and keep it to be unrelated to source data table. Then create measures ArrivalsTAV and ArrivalsTAV -1 .
Year= YEAR(MergedReportData[ArrivalDt])
Year dimension = VALUES(MergedReportData[Year])
ArrivalsTAV =
IF (
SELECTEDVALUE ( MergedReportData[Year] )
= SELECTEDVALUE ( 'Year dimension'[Year] ),
CALCULATE (
COUNTA(MergedReportData[ID]) + 0,
FILTER (
ALLSELECTED ( MergedReportData ),
MergedReportData[Year] = SELECTEDVALUE ( 'Year dimension'[Year] )
)
)
)
ArrivalsTAV -1 =
IF (
SELECTEDVALUE ( MergedReportData[Year] )
= SELECTEDVALUE ( 'Year dimension'[Year] ),
CALCULATE (
COUNTA(MergedReportData[ID]) + 0,
FILTER (
ALLSELECTED ( MergedReportData ),
MergedReportData[Year]
= SELECTEDVALUE ( 'Year dimension'[Year] ) - 1
)
)
)
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I am giving this one a shot and will let you know how it goes, thank you!
@Anonymous do you have date dimension in your model? Is it marked as date table?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous can you try one small quick change, replace parallelperiod with dateadd, let's what result we get and then we can go from there.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks for the idea - changed to DATEADD and the effect is the same
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |