Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to reclassify the annual estimated value according to the selected month, but if I control it with the IF statement, only the selected month is displayed.
I would like to know how to display all the months of the year even if you select a certain month.
To show all the months even if you select a month, you need to disregard the month field in your set analysis expression in the measure, the syntax is like this - {<Month=>}
I know these situations are tricky when if stmt and setanalysis come together. IF actually try to evaluates data row by row but set analysis consider the whole data model together.
If possible try to modify your statement something like this, not sure though -
Sum({<Country=>}Quantity)/Sum({<Country=>} if(Country='Germany',1000,1))
If it doesn't work, please share a sample app and the expected output, something like this will work I believe
Thanks,
Please select the post as solution and close the thread.
To show all the months even if you select a month, you need to disregard the month field in your set analysis expression in the measure, the syntax is like this - {<Month=>}
Thank you for your reply.
I do what you pointed out, but it doesn't work.
Below is the IF statement.
=if(tmpmonth>10,
rangesum(above(Sum({$<Billing_Year={$(tmpYear)},[tmpmonth]=,[tmpquater]=>}AOPGross),0,rowno())),
if(tmpmonth>1,
rangesum(above(Sum({$<Billing_Year={$(tmpYear)},[tmpmonth]=,[tmpquater]=>}AOPGross),0,rowno()))/1000000,
0))
I know these situations are tricky when if stmt and setanalysis come together. IF actually try to evaluates data row by row but set analysis consider the whole data model together.
If possible try to modify your statement something like this, not sure though -
Sum({<Country=>}Quantity)/Sum({<Country=>} if(Country='Germany',1000,1))
If it doesn't work, please share a sample app and the expected output, something like this will work I believe
Thanks,
Hi @tatsuya0127 ,
can you explain you query with sample data and expected output.
So that it will helps to provide correct solution, rather than guessing.
Regards,
Prashant Sangle
Thank you for your reply.
The problem was solved by changing the axis to be compared.
tmpmonth = 1,2,3,4,5,6,7,8,9,10,11,12
Billing_month=202201,202202,202203...202212
I compared "tmpmonth" with the target month and it didn't work.
I was able to control it by using a Right function for "Billing_month".
before: if(tmpmonth>10,A,B)
after:if(right(Billing_month,2)*1>10,A,B) --> OK
It seems I didn't understand the concept of the comparison axis.
Thanks,
Thank you for your reply.
The problem was solved by changing the axis to be compared.
If I have any questions next time, thank you again.
Regards,
Please select the post as solution and close the thread.