Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
We have 2 measures (Sales, Share) which we are showing dynamically in line chart. These 2 measures have different number formatting which I am handling using below expression:
if(Metric='Share',Num(Share,'#0%'),Num(Sales,'##,#00'))
and changed the number formatting to ;Measure Expression' which is giving correct results in Tooltip like % for Share and Number for sales.
But the Y axis remains same its not changing based on metrics. For share as well its showing number.
Any inputs to solve this issue.
Thanks in advance!
you can achieve it by alternate measures only.
with single expression it was not possible to show 2 different scales for Y axis.
Hi,
Correct me if I'm wrong, but it looks like you are trying to drive what is displayed on the line chart by toggling in the field. If you do so, than I'd recommend the following approach:
Create or update your Measures table
[Measures]:
LOAD Metric, MetricFormula, Replace(MetricNumFormat,'.', ',') AS MetricNumFormat INLINE [
Metric, MetricFormula, MetricNumFormat
Share, Sum(Share),#.##0%
Sales, Sum(Sales),#.##0
];
Than use the following Expression
NUM($(=MetricFormula),$(=MetricNumFormat))
Note: I'm not sure why you don't have an aggregation function for your expression, but it usually required. That's why I've added SUM(). Replace it according to your needs
Usually it changes Y axis
It would be great if you can post the screenshot.
Hi
Maybe is not selected automatic format number in measure setting?
Attaching the QVF file for reference. Y axis is still not showing the % values, with measure expression in number format I was able to achieve hover number format.
Any help will be really appreciated!
Thanks!
I have shared the QVF file
Thanks for the helpful solution @SergeyMak .
I was able to get this to work with a small change to your measure expression, the format part of the nested expression needed to be in single quotes.
num($(=MetricFormula),'$(=MetricNumFormat)')