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.
Hello,
I'm currently facing a problem with a computed table : I want to know the restaurant without any survey for the given period in slicer, and display the list in a table on my report.
I've written a DAX function (thanks to a previous question here) to get this information, but I'm not able to do it dynamically.
Here is my data scheme :
fact.Surveys
RestaurantId
DateId
CompletedSurveyDate
RestaurantName
dimension.Restaurants
RestaurantId
RestaurantName
dimension.Date
DateId
Date
Here is the first code, but unfortunately, it's not dynamic
ComputedRestaurantWithoutCompletedSurveyQuestions =
VAR CompletedSurveyQuestionsRestaurants =
DISTINCT (
SUMMARIZE(
FILTER ( 'CompletedSurveyQuestions', 'CompletedSurveyQuestions'[CompletedSurveyDate] >= MIN ( 'dimension Date'[DateDate] )
&& 'CompletedSurveyQuestions'[CompletedSurveyDate] <= MAX ( 'dimension Date'[DateDate] )
), 'CompletedSurveyQuestions'[RestaurantName] )
)
VAR ListRestaurants = VALUES ( 'dimension Restaurants'[RestaurantName] )
VAR NoCompletedSurveyQuestionsRestaurants = EXCEPT ( ListRestaurants , CompletedSurveyQuestionsRestaurants )
RETURN NoCompletedSurveyQuestionsRestaurants
So atfer that, I've created 2 measures in my dimension Date table in order to get Min / Max selected values in my slicer, change my DAX table code, but it also doesn't work
Date Selected Max =
CALCULATE(
MAX( 'dimension Date'[DateDate] ),
ALLSELECTED( 'dimension Date'[DateDate] )
)
Date Selected Min =
CALCULATE(
MIN( 'dimension Date'[DateDate] ),
ALLSELECTED( 'dimension Date'[DateDate] )
)
ComputedRestaurantWithoutCompletedSurveyQuestions =
VAR CompletedSurveyQuestionsRestaurants =
DISTINCT (
SUMMARIZE(
FILTER ( 'CompletedSurveyQuestions', 'CompletedSurveyQuestions'[CompletedSurveyDate] >= ( 'dimension Date'[Date Selected Min] )
&& 'CompletedSurveyQuestions'[CompletedSurveyDate] <= ( 'dimension Date'[Date Selected Max] )
), 'CompletedSurveyQuestions'[RestaurantName] )
)
VAR ListRestaurants = VALUES ( 'dimension Restaurants'[RestaurantName] )
VAR NoCompletedSurveyQuestionsRestaurants = EXCEPT ( ListRestaurants , CompletedSurveyQuestionsRestaurants )
RETURN NoCompletedSurveyQuestionsRestaurants
Hello,
Here is the output I want : A table with the name of restaurants without survey on the selected period in the Date Slicer.
I want this table to be dynamic (At the moment, it's not, change the date in the slicer does nothing. Maybe my DAX code is wrong).
Desired Output :
Date Slicer :
Please take the time to provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided. Your screenshot came over all garbled.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
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 |
---|---|
105 | |
96 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |