Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Line Chart

Hi,

 

I have the following as a measure:

Q1_T2B =
CALCULATE(
(CALCULATE(SUM(TABLE[wgt]),TABLE[Q1_Index]<3))
/
(CALCULATE(SUM(TABLE[wgt]),TABLE[Q1_Index]<5))
)
 
I've read and watched a lot of examples but most of them use date.  I've tried using some non-date solutions but when I put my wave in my x axis then nothing appears in the line chart.  I've tried many different things but can't seem to get anything to work.  Does anyone have any solutions I can try out?
 
Thanks!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please update the formula of your measure as below:

Q1_T2B =
VAR _selwave =
    SELECTEDVALUE ( 'TABLE'[WAVE] )
RETURN
    DIVIDE (
        CALCULATE ( SUM ( 'TABLE'[WEIGHTS] ), 'TABLE'[Q1_Index] < 3 ),
        CALCULATE (
            SUM ( 'TABLE'[WEIGHTS] ),
            FILTER (
                ALL ( 'TABLE' ),
                'TABLE'[Q1_Index] < 5
                    && 'TABLE'[WAVE] >= _selwave - 1
                    && 'TABLE'[WAVE] <= _selwave
            )
        ),
        0
    )

yingyinr_0-1616403492489.png

If the above one is not your expected result, please provide your expected result with samples and calculation logic base on current sample data. Thank you.

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Please update the formula of your measure as below:

Q1_T2B =
VAR _selwave =
    SELECTEDVALUE ( 'TABLE'[WAVE] )
RETURN
    DIVIDE (
        CALCULATE ( SUM ( 'TABLE'[WEIGHTS] ), 'TABLE'[Q1_Index] < 3 ),
        CALCULATE (
            SUM ( 'TABLE'[WEIGHTS] ),
            FILTER (
                ALL ( 'TABLE' ),
                'TABLE'[Q1_Index] < 5
                    && 'TABLE'[WAVE] >= _selwave - 1
                    && 'TABLE'[WAVE] <= _selwave
            )
        ),
        0
    )

yingyinr_0-1616403492489.png

If the above one is not your expected result, please provide your expected result with samples and calculation logic base on current sample data. Thank you.

Best Regards

Anonymous
Not applicable

Hi @Anonymous 

 

How do I add ALLEXCEPT to the measure so that I can use filters with it?  I want to filter by GENDER for example

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.