Forum Discussion
Need help in DAX
Hi TejeshGour,
The FactTable link is not accessible. Please double check it.
For your screenshot, it looks like there are four legends (Gender, Race, SchoolYear, SchoolName) display in the chart, you would like to keep the SchoolYear displaying regardless any filter will filter out SchoolYear, right? I'm afraid this is not supported currently.
Best Regards,
Qiuyun Yu
https://drive.google.com/file/d/1jFr3cfSQbZemjFuKX50gLS45qlQ0R0Bq/view?usp=sharing
Thanks for your response!
Actually SchoolYear will not use in slicer that will be in chart and remaining categories will be use in slicer.
PFA sampleData.
I am not able to attach document. How I can attach?
- v-qiuyu-msft7 years agoCommunity Support
Hi TejeshGour,
Thank you for your information. I'm able to view the sample data shared by you here: https://drive.google.com/file/d/1jFr3cfSQbZemjFuKX50gLS45qlQ0R0Bq/view
Would you please clarify the desired results based on this data?
Best Regards,
Qiuyun Yu - Anonymous7 years agoNot applicable
Given below is my requirement and as you can see year is a first category and second category will be select from slicer.
- v-qiuyu-msft7 years agoCommunity Support
Hi Anonymous,
It looks like the Race, Gender, Ethinicity, School and Grade are not the legends of the chart visual, right?
If they are buttons, you can create different bookmarks to display the chart with different category, then link the button to desired bookmark. See: https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks
Best Regards,
Qiuyun Yu- Anonymous7 years agoNot applicable
I got your point but I am trying to avoint charts and covering space in report.
Please check my first description where my DAX is not returning data.
Calculated Column1:= var StudentCount1 = CALCULATE ( DISTINCTCOUNT(FactGrades[DimStudentsWid]), FILTER ( VALUES( FactGrades[PercentGradeReceived]) , COUNTROWS ( FILTER ( 'DimReportingConfig', FactGrades[PercentGradeReceived] >= 'DimReportingConfig'[MinValue] && FactGrades[PercentGradeReceived] < 'DimReportingConfig'[MaxValue]&&NOT(ISBLANK(FactGrades[PercentGradeReceived])) ) ) > 0 ) ) RETURN IF ( HASONEVALUE(SelectiomTable[Type]), SWITCH ( VALUES( SelectiomTable[Type] ), "SchoolYear", CALCULATE ( StudentCount1, TREATAS ( VALUES( SelectiomTable[VALUES] ),SectionEnrollment[SchoolYear] ) ), "GradeLevel", CALCULATE ( StudentCount1, TREATAS ( VALUES( SelectiomTable[VALUES] ), SectionEnrollment[GradeLevel]) ) ),0 )