Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, ( stalwar1),
Here is my table:
Dimension: Pays, column : month of date
measure:
if pays = maroc then :
Count({<[Year of date]={$(=max([Year of date]))}, [Month of date]=, Code_Ligne={'MAR'}, Groupe_Complet_Vide = {G,C},
Dossier = {"=Count({<[Month of date]=, Code_Ligne={'MAR'}, Groupe_Complet_Vide = {G,C}>}Aggr(COUNT({<[Month of date]=, Code_Ligne={'MAR'}, Groupe_Complet_Vide = {G,C}>} Code_Carrier&Plaque),Date_Embarquement,Plaque))=1"}>} Dossier)
,
if pays <> maroc then:
Count({<[Year of date]={$(=max([Year of date]))}, [Month of date]=,Groupe_Complet_Vide={c,C,G}>}Dossier)
here is how I wrote it :
if(Pays='Maroc',
Count({<[Year of date]={$(=max([Year of date]))}, [Month of date]=, Code_Ligne={'MAR'}, Groupe_Complet_Vide = {G,C},
Dossier = {"=Count({<[Month of date]=, Code_Ligne={'MAR'}, Groupe_Complet_Vide = {G,C}>}Aggr(COUNT({<[Month of date]=, Code_Ligne={'MAR'}, Groupe_Complet_Vide = {G,C}>} Code_Carrier&Plaque),Date_Embarquement,Plaque))=1"}>} Dossier)
,
if(Pays<>'Maroc',
Count({<[Year of date]={$(=max([Year of date]))}, [Month of date]=,Groupe_Complet_Vide={c,C,G}>}Dossier)
))
result:
What I want is, even so I select a month, my table must not change ; but with the way it is, there is some changes in the line Maroc when I select a month:
See: I select Fev; only the value for Maroc on Fev does not change, Janv and Mars does change in Maroc:
Now, if my expression was only treating the Maroc part:
Count({<[Year of date]={$(=max([Year of date]))}, [Month of date]=, Code_Ligne={'MAR'}, Groupe_Complet_Vide = {G,C},
Dossier = {"=Count({<[Month of date]=, Code_Ligne={'MAR'}, Groupe_Complet_Vide = {G,C}>}Aggr(COUNT({<[Month of date]=, Code_Ligne={'MAR'}, Groupe_Complet_Vide = {G,C}>} Code_Carrier&Plaque),Date_Embarquement,Plaque))=1"}>} Dossier)
, the table won't be afffected with a selection of a Month of date
But when there is an If condition, Maroc is always changing when I select a month..
Any idea on how should I alter my measure?
tHANKS
omarbensalem if this is resolve then please close this thread by marking assumed answer (and all the remain threads which are still open on this same topic)
I guess the issue was to ignore selection in the if statement part of the equation
If(Only({<[month of date]>}Pays) = 'Maroc',
Thanks,
Sunny
omarbensalem if this is resolve then please close this thread by marking assumed answer (and all the remain threads which are still open on this same topic)
I guess the issue was to ignore selection in the if statement part of the equation
If(Only({<[month of date]>}Pays) = 'Maroc',
Thanks,
Sunny
Thank you Sunny for your time