Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am unable to use the date selected from the slicer into my dax formula. The value returned is blank.
Note that my 'date' column is called "full formar for period". I created a continuous date column which i called "full format for period"
Solved! Go to Solution.
Hi @kaileena
in this case SELECTEDVALUE returns blank as it cannot find a single value of the date because you selecting a period (a month or multiple months) not a single date. Therefore as long as there is no blank dates in the Measurement Table, the filtered table will be empty. Therefore you need to use ALLSELECTED or VALUES to retrieve the selected dates, then you can use IN operator to check if current row date inside CALCULATE filter is within the selected period. Please try the following with either ALLSELECTED or VALUES
Value for Slicer Selected Month Budget Spent =
CALCULATE (
SUM ( 'Measurement'[Value] ),
'Measurement'[Type] = "Budget Spent",
Measurement[Full Format for Period]
IN VALUES ( ForSlicer[Full Format for Period] )
)
Hi @kaileena
in this case SELECTEDVALUE returns blank as it cannot find a single value of the date because you selecting a period (a month or multiple months) not a single date. Therefore as long as there is no blank dates in the Measurement Table, the filtered table will be empty. Therefore you need to use ALLSELECTED or VALUES to retrieve the selected dates, then you can use IN operator to check if current row date inside CALCULATE filter is within the selected period. Please try the following with either ALLSELECTED or VALUES
Value for Slicer Selected Month Budget Spent =
CALCULATE (
SUM ( 'Measurement'[Value] ),
'Measurement'[Type] = "Budget Spent",
Measurement[Full Format for Period]
IN VALUES ( ForSlicer[Full Format for Period] )
)
i did. i think the problem comes from how my tables are connected. (Or not connected. )
This is the current outcome.it does not show the correct value. i will explain.
this is the model. The value i need to aggregate is in the table "measurement" which has a column called "full format for period". For a different use case, i created the "ForSlicer" table (
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |