Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have to display current year sales and compare it to last year sales. I created three measures in order to do it:
SalesTotal = SUM( Orders[Sales] )
SalesYTD = TOTALYTD( [SalesTotal] ; 'Date'[Date] )
SalesYTDLastYear = CALCULATE( [SalesYTD]; SAMEPERIODLASTYEAR( 'Date'[Date] ) )
Solved! Go to Solution.
Hi,
My guess is that for Technology, the % in the card visual evaluates to an error. What is the measure for %? Also, what error do you get when you click on Voir Les Details? Share the link from where i can download your PBI file.
Hi,
My guess is that for Technology, the % in the card visual evaluates to an error. What is the measure for %? Also, what error do you get when you click on Voir Les Details? Share the link from where i can download your PBI file.
Thanks, I did not even think of reading the error message:
MdxScript(Model) (18, 60) Calculation error in the measurement'Orders'[ProfitYTDLastYear] : The "SAMEPERIODLASTYEAR" function expects a contiguous selection when the date column comes from a table on side 1 of a bidirectional relationship.
After reading this, I changed the relationship between my tables 'date' and 'orders' as single.
I will search for documentation about "cross-filter direction" (here I found something).
You are welcome.
User | Count |
---|---|
141 | |
70 | |
69 | |
53 | |
52 |
User | Count |
---|---|
208 | |
94 | |
64 | |
60 | |
57 |