Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a list of KPIs as a dimension. Which have various kinds of metrics like Totals, Costs, Percentages etc. I need to format the data based on the kind. For example, if KPI is related to cost, i need '$ #,###' as format and if Percentage '#.##%' ... using if else .. in the expression will do, but if I have many variations like above, it becomes complicated.
I have tried with keeping a column with the symbols to be added and appended it using (DataValue)&Wildcard. But this fails when the DataValue is null or empty.
Can we achieve this in QlikView? Or else is there any work around.
Thanks in advance.
Try
= NUM(if(wildmatch(KPI,'Percentage*'),Value/100,Value),Pick(WildMatch(KPI,'Percentage*','Ratio','Total*'),'#.0%','##.0','$##,###'))
Hi Shiva,
please post a sample app or sample data, you can format expressions using NUM() function make sure you check expression default in Number tab
Hi..Shiva,
You have to take measure of cost which is numeric value and then you can give the title "Cost" and you can set percentage of achieved from settings.
Please remember to mark this as helpful or the correct answer if I have helped you or answered your question.
This will help users identify the answers should they come across this thread in the future.
Regard's
Sarvesh Srivastava
Dear shiva
find the attach file
Please find the attachment explaining the requirement more clearly. Excuse me for not being clear in my requirement.
Try
= NUM(if(wildmatch(KPI,'Percentage*'),Value/100,Value),Pick(WildMatch(KPI,'Percentage*','Ratio','Total*'),'#.0%','##.0','$##,###'))
Thanks Vineeth, But my expression is not as simple, am already using set analysis and if in future if variations increase like (now i have %,$, ratio and if they increase) Adding if else clause for everything makes it hard. Is there work around.
Yes there is, wait a minute
create one expression for each KPI and remove the KPI from dimension, you can then format from Number tab
That's a very cool idea Vineeth, but I have around 10 expressions already in my table. Your answer is perfect for a single column. But I think I can't use this approach in my case.