Forum Discussion
Prabha45
Helper III
3 years agoDAX - Selected value
Hi I wrote a measure where if is January is selected measure shows 1, february 2, so on till december. Measure = switch(selectedvalue (dim_table[month_name]), ...
FreemanZ
Super User
3 years agohi Prabha45
1) try to add a column like:
month_number =
SWITCH(
[month_name],
"January", 1,
"February", 2,
"March", 3,
"April", 4,
"May", 5,
"June", 6,
"July", 7,
"August", 8,
"September", 9,
"October", 10,
"November", 11,
12
)
2) then plot a measure like this:
Measure =
CONCATENATEX(
TableName,
TableName[month_number],
","
)
it worked like:
Prabha45
Helper III
3 years agoThanks that worked. But, the measure is in Text format. I used convert to change it to integer then the output changed to 123.
- Prabha453 years ago
Helper III
I need to trigger a function app with the filters selected in Power BI as input for the function app. It has month parameter which accepts inputs as 1 or 1,2 or 1,2,3. If I use the above measure( text format) it takes the values as "1,2,3". So, I converted it to integer then it took input as 123.