Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have requirement as below:
I created a inline table Filter1 :
Load * Inline [
Filter1
0
5
10
15
20
];
In Front end, in a table i have a measure column named Total Sales.
In Total Sales i have written the logic as below:
=sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])
Now , if i select Filter1 value as 15 , my table should display sales greater than 15. i need to provide a link of Filter1 and Total Sales column in my table.
Please help me out.
Thank you so much it worked.
Greater than sales i am getting in the table othere values are becoming null. This is perfect.
is it possible in the same expression, now i need to include less than the selected value in Filter1.
for e.g. if i click 15 in Filter1, the column Total Sales should display the values less than 15.
Please help. Thanks a lot for helping.
You need to change '>' to '<' in the second condition
if(GetSelectedCount(Filter1)>0,
if(sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])<Filter1,sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])),
sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))
Happy to help you 🙂
Hi,
I dont need to write a second condition. As i have only two filters as FilterOverSales and FilterUnderSales. And only one column Total Sales.
So i have written the first condition of yours in Total Sales. so it is working for FilterOverSales, but not FilterUnderSales.
how to write in the same logic ?
Something like this maybe:
if(GetSelectedCount(Filter1)>0,
if(sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])>FilterOverSales,sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]),
if(sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])<FilterUnderSales,sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))),
sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))
Hi,
the below logic is not working because the first line of the code says getselectedcount(Filter1)
if(GetSelectedCount(Filter1)>0,
if(sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])>FilterOverSales,sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]),
if(sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])<FilterUnderSales,sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))),
sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))
if(GetSelectedCount(FilterOverSales)>0, if(sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])>FilterOverSales,sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]), if(GetSelectedCount(FilterUnderSales)>0, (sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])<FilterUnderSales,sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))), sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))
Im not sure if there are any brackets missing but should be fine
Thank you for helping out.