Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am a novice and trying to get a row count using the expression below:
=Count({$<Scheduled_Month={$(=(Month))}>}Scheduled_Month)
Here, column Scheduled_Month is in Table XYZ and column Month is in table ABC. XYZ and ABC have no relation.
I am trying to get the row count from table XYZ for a particular Scheduled_Month whose value equals to a static value in column Month of ABC.
Please let me know what is wrong with the above expression?
Thanks.
I see what you mean. And I see that I attached wrong file, sorry.
Take a look at the attached now. You don't need set here, the expression is using if() function
This expression will work only when one Month is selected. Is it what you want?
Edit: attached an example as you described it.
What do you mean by tables are not related?
You probably need to join the tables by creating a common key probably something like
XYZ:
load
....
Scheduled_Month,
Scheduled_Month as Month_Key,
....;
ABC:
load
....
Month
Month as Month_Key,
....;
Then you simply create straight table with Month as a Dimension and count(Scheduled_Month) as Expression
Thanks Michael and Ivan for your replies.
Ivan I tried your suggestion. But I am making a bar chart and it is resulting in a cumulative row count of all the months in a single bar. But I want it to be in different bars for each months in ABC.Month column.
XYZ.Scheduled_Month may or may not contain all the months. So for all those months which have no rows in XYZ, the bar length should be zero.
Michael you are right. It worked only for the selected month. But I need a sort of a default display for all the months and it depends on no selections.
I see what you mean. And I see that I attached wrong file, sorry.
Take a look at the attached now. You don't need set here, the expression is using if() function
Thanks Michael! This was helpful. I had to also use trim to get the match. Thanks again!