Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi
I have created a Slicer on Book Edition.
I then created a measure on Edition.
So from this image, I selected Edition 4 (slicer) and the two card measures show the created measures are correct, 4 and 3.
Yet notice that the 'Test_Units' both have the same count for Edition number 4. I would have expected the Test One to be at 1,189 and the second to be at 4,245
Can I not use the function 'selectedvalue' in this manner?
Here are the two Test Unit measures.
@IamTDR , Try like
TEST Units = CALCULATE(SUM(LOTSales[LOT Units]),FILTER(LOTSales,LOTSales[Edition] = [Selected Edition]))
TEST Units 2 = CALCULATE(SUM(LOTSales[LOT Units]),FILTER(LOTSales,LOTSales[Edition] = [Selected Edition Previous]))
I just did a sample test using years instead of edition numbers. I am getting the same incorrect results.
From my image, if I select fiscal year 2022, the cards show as expected having the year selected and the previous year. However, note the table where it shows the correct value for the selected year's units but the previous year is now blank.
Measures used
1.
Thanks for the reply. The first measure works as expected but the measure to calculate the previous edition units does not. Perhaps its not possible to use a 'selectedvalue' in a measure where you minus one. Strangely, if I place the previous edition measure into a card I get the desired result.
What I am trying to achieve, is a way for end users to select a book's edition, and compare sales with the previous edition. I thought this method would work but the previous edition measure just will not revert to the previous edition. Note, the field 'edition' in my LOTSales table has a whole number datatype.
User | Count |
---|---|
117 | |
75 | |
62 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |