Forum Discussion
If Condition
Anonymous are you adding a measure or column? if you are adding a column, it will work.
- Anonymous7 years agoNot applicable
Hi All,
I'm adding a measure, please help me with a solution for this.
Need to add a measure becoz calculated column will not work for my data since i've other complications, hence should use Measure.
1. need to count unique clients for each month, i used DIstinctCount(client).
2. For Type = Bundle, it should take the count from the Count Column, for example, for Client A the clint count for May month is 50 and April 65.
3. For all Regular Client count should Client Column by using DistinctFunction.
i've created Distint count ( Disctinct Cout of column Client) as a single measure and Sum of Bundle clients (Sum(count)) as anotheer Measure, and trying to create a new measure by applying IF condition, as below
If(Table[Type]="Bundle",(distinctcountmeasure), (sumof Bundle measure))
Please correct me and advise the solution accrordingly.
REgards
- parry2k7 years agoSuper User
Anonymous if you want to add as measure, you need use aggregation for your type in calculation, something like this
If(MAX(Table[Type])="Bundle",(distinctcountmeasure), (sumof Bundle measure))
- Anonymous7 years agoNot applicable
Hi ,
MAX function dint work, shows error as many aurguments passed for MAx function.
REgards.
- Ashish_Mathur7 years agoSuper User
Hi,
Does this measure work?
=IF(HASONEVALUE(Table[Type]),If(VALUES(Table[Type])="Bundle",(distinctcountmeasure), (sumof Bundle measure)),BLANK())
- Anonymous7 years agoNot applicable
Hello Ashish,
I dint get any value.
REgards