cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

## help needed

present in culum chart

Thanks

1 ACCEPTED SOLUTION
Community Support

Hi @akas2023 ,

Table2:

2. create measure with below dax formula

``````B and Above Adj =
VAR _class =
SELECTEDVALUE ( 'Table 2'[Class] )
VAR _year =
SELECTEDVALUE ( 'Table 2'[Year] )
VAR tmp =
FILTER ( ALL ( 'Table' ), [Class] = _class && [Year] = _year )
VAR tmp1 =
FILTER ( tmp, UNICODE ( [Marks] ) <= UNICODE ( "B" ) )
VAR _val =
DIVIDE ( COUNTROWS ( tmp1 ), COUNTROWS ( tmp ) )
VAR tmp2 =
FILTER ( ALL ( 'Table' ), [Year] = _year )
VAR _val1 =
DIVIDE ( COUNTROWS ( tmp2 ), COUNTROWS ( ALL ( 'Table' ) ) )
VAR _b =
IF ( _class = "OverAll", _val1, _val )
RETURN
_b
``````
``````C and Above Adj =
VAR _class =
SELECTEDVALUE ( 'Table 2'[Class] )
VAR _year =
SELECTEDVALUE ( 'Table 2'[Year] )
VAR tmp =
FILTER ( ALL ( 'Table' ), [Class] = _class && [Year] = _year )
VAR tmp1 =
FILTER ( tmp, UNICODE ( [Marks] ) <= UNICODE ( "C" ) )
VAR _val =
DIVIDE ( COUNTROWS ( tmp1 ), COUNTROWS ( tmp ) )
VAR tmp2 =
FILTER ( ALL ( 'Table' ), [Year] = _year )
VAR _val1 =
DIVIDE ( COUNTROWS ( tmp2 ), COUNTROWS ( ALL ( 'Table' ) ) )
VAR _b =
IF ( _class = "OverAll", _val1, _val )
RETURN
_b
``````

3. add a clustered column chart with Table2 fields and measure

Please refer the attached .pbix file.

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 REPLIES 5
Community Support

Hi @akas2023 ,

In order to better understand your demands and give the right solution, could you please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?

Best regards,
Community Support Team_Binbin Yu

Frequent Visitor

 B and Above C and Above Year 1 2019-2020 82% 96% 2020-2021 79% 100% 2021-2022 54% 95% Year 2 2019-2020 85% 96% 2020-2021 93% 98% 2021-2022 68% 83% Overall 2019-2020 79% 94% 2020-2021 86% 98% 2021-2022 63% 87%

Community Support

Hi @akas2023 ,

Why Year1, 2019-2020, B and above is 82%? why is not 67%? could you please explain the calculate rule?

Best regards,
Community Support Team_Binbin Yu

Frequent Visitor

The percentage is correct but the problem is I cannot include whole table bcoz of characters limitation.kindly help to how to do.thanks

Community Support

Hi @akas2023 ,

Table2:

2. create measure with below dax formula

``````B and Above Adj =
VAR _class =
SELECTEDVALUE ( 'Table 2'[Class] )
VAR _year =
SELECTEDVALUE ( 'Table 2'[Year] )
VAR tmp =
FILTER ( ALL ( 'Table' ), [Class] = _class && [Year] = _year )
VAR tmp1 =
FILTER ( tmp, UNICODE ( [Marks] ) <= UNICODE ( "B" ) )
VAR _val =
DIVIDE ( COUNTROWS ( tmp1 ), COUNTROWS ( tmp ) )
VAR tmp2 =
FILTER ( ALL ( 'Table' ), [Year] = _year )
VAR _val1 =
DIVIDE ( COUNTROWS ( tmp2 ), COUNTROWS ( ALL ( 'Table' ) ) )
VAR _b =
IF ( _class = "OverAll", _val1, _val )
RETURN
_b
``````
``````C and Above Adj =
VAR _class =
SELECTEDVALUE ( 'Table 2'[Class] )
VAR _year =
SELECTEDVALUE ( 'Table 2'[Year] )
VAR tmp =
FILTER ( ALL ( 'Table' ), [Class] = _class && [Year] = _year )
VAR tmp1 =
FILTER ( tmp, UNICODE ( [Marks] ) <= UNICODE ( "C" ) )
VAR _val =
DIVIDE ( COUNTROWS ( tmp1 ), COUNTROWS ( tmp ) )
VAR tmp2 =
FILTER ( ALL ( 'Table' ), [Year] = _year )
VAR _val1 =
DIVIDE ( COUNTROWS ( tmp2 ), COUNTROWS ( ALL ( 'Table' ) ) )
VAR _b =
IF ( _class = "OverAll", _val1, _val )
RETURN
_b
``````

3. add a clustered column chart with Table2 fields and measure

Please refer the attached .pbix file.

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors