Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a chart which has 2 measures as follows:
Measure 1:
if($(Vendor)=2, Count(distinct{<[NetValueinUSD]={"<=$(=$(vInput))"},[TypeOfContracting]={'Non Contracted'}>}[Vendor Name]),
if($(Vendor)=1,Count({<[NetValueinUSD]={"<=$(=$(vInput))"},[TypeOfContracting]={'Non Contracted'}>}[PurchDocument])))
Measure 2:
Sum({<[NetValueinUSD]={"<=$(=$(vInput))"},[TypeOfContracting]={'Non Contracted'}>}[NetValueinUSD])/1000000
Now I have a filter pane which has the field, TypeOfContracting, which has 2 values: Contracted and Non Contracted. If I select Contracted in this filter, my chart values are changing. But as you can see from above, I'm using only measures based on Non Contracted data. So, in short, my chart shouldn't display the data if Contracted is selected in the filter. If this is not possible I'd like to exclude this filter from affecting my chart at all. Can anyone help me fix this? TIA!
I have not looked at the sample, but make make this change
Sum({<Type *= {"N"}>}[Sales])
Read about this here:
Hi,
Not sure but change your expression to below.
Count(distinct{<[NetValueinUSD]={"<=$(=$(vInput))"},[TypeOfContracting]={'Non Contracted'}>} if($(Vendor)=2,'[Vendor Name]','[PurchDocument]'))
Regards,
Kaushik Solanki
Hello. Let me explain this a bit. I have a chart which will measure Vendors or PurchDocuments(of non contracted type) according to the variable Vendor. That is measure 1. The expression is fine. What I'd like to do is stop the filter TypeOfContracting from affecting this chart. Because as you can see from the expression, I'm showing only Non Contracted count. Now it doesn't make sense if I selected Contracted from the TypeOfContracting filter and the chart gives some value.
Can you tell us what value is hold by variable Vendor and Input?
Regards,
Kaushik Solanki
Vendor Variable is like a switch. It has values =1 or 2. The measure changes to Count by Vendor if Vendor Variable =1 or Count by PurchDocument if Vendor Variable=2. Input is a dynamic variable which can be input by the user.
If possible, please share the application.
If not with actual data then dummy data which showcases your issue.
Regards,
Kaushik Solanki
Hello. PFA the qvf. Now as you can see, the filter Type if selected to C is affecting the chart. But as you can see from expressions, we are taking only counts for Type =N. So I'd like for the chart to be blank if C is selected in type. If this is not possible, prevent this filter from changing the chart at all. Thanks!
Hi,
It is because of your dimension.
You have used the sum function in dimension but you have not filter it.
This include Sum({<Type={"N"}>}[Sales]) into your dimension and you will see it works.
Regards,
Kaushik Solanki
If I do this, when I select 'C' in Type filter, the chart stops changing. That is fine but is there any way where the chart goes blank if I select Type 'C' in the filter? I feel this makes more sense don't you think rather than the chart not changing?
I have not looked at the sample, but make make this change
Sum({<Type *= {"N"}>}[Sales])
Read about this here: