Forum Discussion
hide complete text or partial text in textbox based on certain conditions
- 2 years ago
Hi,
So here whats I Implemented.
rev_Across_country_Industry_JoinTbl =
var Bucket_Filter= HASONEFILTER(Bucket_Filter[Bucket])
VAR Country_Industry =
CONCATENATEX(
FILTER(
VALUES( Country_Industry_CrossJoin[Country_Industry]),
[Rev] < -20 &&
[Rev%] < -0.06
),
Country_Industry_CrossJoin[Country_Industry],
", "
)
VAR VIP_client=
CONCATENATEX (
FILTER (
Client,
client[Clientid] IN { 2,3 } &&
[Rev] < -20 &&
[Rev%] < -0.06
),
client[clientName],
", "
) --& " account"
RETURN
--COuntry_industry
if(HASONEFILTER(DimBucket[Bucket]), blank(),
IF (
NOT ISBLANK(Country_Industry) && NOT ISBLANK(VIP_client),
"• Requiring attention country and industry " & Country_Industry & ", as well as the " & VIP_client & " account",
if(NOT ISBLANK(Country_Industry) && ISBLANK(VIP_client),
"• Requiring attention are/is the Country_Industry " & Country_Industry,
if(ISBLANK(Country_Industry) && NOT ISBLANK(VIP_client), "• Requiring attention are/is the " & VIP_client & " account",blank() )
)
)
)
HASONEFILTER => to hide all sentences
if conditions placed within one another carefully as the way I wanted them to be evaluated. If not placed properly they wont function as expected.
Hi,
So here whats I Implemented.
rev_Across_country_Industry_JoinTbl =
var Bucket_Filter= HASONEFILTER(Bucket_Filter[Bucket])
VAR Country_Industry =
CONCATENATEX(
FILTER(
VALUES( Country_Industry_CrossJoin[Country_Industry]),
[Rev] < -20 &&
[Rev%] < -0.06
),
Country_Industry_CrossJoin[Country_Industry],
", "
)
VAR VIP_client=
CONCATENATEX (
FILTER (
Client,
client[Clientid] IN { 2,3 } &&
[Rev] < -20 &&
[Rev%] < -0.06
),
client[clientName],
", "
) --& " account"
RETURN
--COuntry_industry
if(HASONEFILTER(DimBucket[Bucket]), blank(),
IF (
NOT ISBLANK(Country_Industry) && NOT ISBLANK(VIP_client),
"• Requiring attention country and industry " & Country_Industry & ", as well as the " & VIP_client & " account",
if(NOT ISBLANK(Country_Industry) && ISBLANK(VIP_client),
"• Requiring attention are/is the Country_Industry " & Country_Industry,
if(ISBLANK(Country_Industry) && NOT ISBLANK(VIP_client), "• Requiring attention are/is the " & VIP_client & " account",blank() )
)
)
)
HASONEFILTER => to hide all sentences
if conditions placed within one another carefully as the way I wanted them to be evaluated. If not placed properly they wont function as expected.