Forum Discussion
Error generating a table with a variable
Good afternoon forum,
I'm having trouble generating a pivot table. The main idea is that the table is generated from the value selected in the filter. Below I share the code made so far.
Clarifications
The selectedvalue function is not registering the selection correctly, what would be the reason?
On this particular page of the report I have a measure that also uses the selected value from the filter to perform calculations, it works well.
2 Replies
- Jeremias_Mena08New Member
In the original code is the word VAR used as a keyword to identify the SelectedGenre variable.
Here is an example.
Here's what the code currently returns.
Lo que devuelveWhat it gives back
Here's what you should return - AnonymousNot applicable
There seems to be a typo in your code. The WERE keyword should be VAR.
VAR SelectedGenre = SELECTEDVALUE('Musical genre'[nombre_genero])If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.