Forum Discussion
Anonymous
4 years agoNot applicable
Grand total become false
Hi All,
For the following table below, how should I write in dax for making grand total become false, if they contain false. such as Accessories contains false and I want the grand total becoming false.
Hi Anonymous
Please try to adjust the measure as followsNewMeasure = VAR T1 = ADDCOLUMNS ( VALUES ( ProductCategory[ProductCategoryName] ), "@Flag", CALCULATE ( IF ( SUM ( InternetSales_USD[SalesAmoun_USD] ) > 200000, TRUE (), FALSE () ) ) ) VAR T2 = SELECTCOLUMNS ( T1, "@@Flag", [@Flag] ) RETURN IF ( FALSE () IN T2, FALSE (), TRUE () )Hi,
I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
It is for creating a measure.
True or false measure: = VAR _newtable = ADDCOLUMNS ( SUMMARIZE ( InternetSales, Category[Category], 'Year'[Year] ), "@condition", IF ( CALCULATE ( SUM ( InternetSales[SalesAmount] ) ) > 200000, TRUE (), FALSE () ) ) RETURN IF ( COUNTROWS ( FILTER ( _newtable, [@condition] = FALSE () ) ) >= 1, FALSE (), TRUE () )
2 Replies
- tamerj1
Community Champion
Hi Anonymous
Please try to adjust the measure as followsNewMeasure = VAR T1 = ADDCOLUMNS ( VALUES ( ProductCategory[ProductCategoryName] ), "@Flag", CALCULATE ( IF ( SUM ( InternetSales_USD[SalesAmoun_USD] ) > 200000, TRUE (), FALSE () ) ) ) VAR T2 = SELECTCOLUMNS ( T1, "@@Flag", [@Flag] ) RETURN IF ( FALSE () IN T2, FALSE (), TRUE () ) - Jihwan_Kim
Super User
Hi,
I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
It is for creating a measure.
True or false measure: = VAR _newtable = ADDCOLUMNS ( SUMMARIZE ( InternetSales, Category[Category], 'Year'[Year] ), "@condition", IF ( CALCULATE ( SUM ( InternetSales[SalesAmount] ) ) > 200000, TRUE (), FALSE () ) ) RETURN IF ( COUNTROWS ( FILTER ( _newtable, [@condition] = FALSE () ) ) >= 1, FALSE (), TRUE () )