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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
LT_2727
New Member

Plotting cumulative data only up to current week vs target line

Hi, 

 

I am plotting actual data vs target data. The data being measured is completed tasks, I have a separate data table for the target line, and then the data for the actual line is being taken from a planning board (it counts the task when it's moved to done). 

 

The issue I have is that the entire line is being plotted for the actual data, when I just want it to plot up to the current week. 

 

LT_2727_0-1710940716059.png

As you can see, we are on week commencing 18th of March, however the entire line (pink) is being plotted to the target date. Ideally the line would just plot up to the current data, however I want the target line (blue) to remain the same.

 

To be honest I'm not too experienced in Power BI. I'm guessing a measure can maybe be used but I'm not sure how and it doesn't seem to be easily googleable 

 

Thanks for any help. 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @LT_2727 ,

I created some data:

vyangliumsft_0-1711000912571.png

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    MAX('Table2'[Group])="AR Target",
    COUNTX(
        'Table2',
        [Week completed]),
       COUNTX(
        FILTER('Table2',
        'Table2'[Date]<=TODAY()
        ),[Week completed]))

2. Result:

vyangliumsft_1-1711000912577.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @LT_2727 ,

I created some data:

vyangliumsft_0-1711000912571.png

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    MAX('Table2'[Group])="AR Target",
    COUNTX(
        'Table2',
        [Week completed]),
       COUNTX(
        FILTER('Table2',
        'Table2'[Date]<=TODAY()
        ),[Week completed]))

2. Result:

vyangliumsft_1-1711000912577.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

asfasfgasfg
Frequent Visitor

You could use ISBLANK ( 
Or 
IF actuals is 0 , "" , Actuals

 

Would need more information to actually help you out. 

What info would help? 

 

This is my measure: 

 
AR Actual =
CALCULATE(
    COUNTA('Query1'[Week completed]),
    FILTER(
        ALLSELECTED('Table'[Week completed]),
        ISONORAFTER('Table'[Week completed], MAX('Table'[Week completed]), DESC)
    )
)

 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.