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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
aejohnson04
Frequent Visitor

New Blank Headed Column appearing with SUM ALL Measure

Hello. Can anyone help me with figuring out why a blank headed column appears when I run my "At risk all projects" measure? If I change what ALL() applies to, it goes away. But for some reason when I use ALL() on project names, this mysterious column appears every time. It is throwing off further calcualtions I have. See pbix screenshot below and original table.

aejohnson04_0-1678199919358.png

aejohnson04_1-1678199937364.png

 

2 ACCEPTED SOLUTIONS
v-yiruan-msft
Community Support
Community Support

Hi @aejohnson04 ,

How did you set your matrix visual? I create a matrix visual as below base on your provided sample data. It is different with yours...

yingyinr_0-1678329382576.pngIn order to get a better understanding on your requirement and give you a suitable solution for you, could you please provide some raw data in your table (exclude sensitive data) with Text format, your matrix visual settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
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

Hi @aejohnson04 ,

I updated your sample pbix file(see the attachment), please check if that is what you want.

1. Create a date dimension table, please DO NOT create any relationship with 'Increment' table

Dates = VALUES('Increment'[Date])

yingyinr_0-1678440195951.png

2. Create two measures as below to get the culmulative values

Sum of at risk amount = 
CALCULATE (
    SUM ( 'Increment'[Money At Risk] ),
    FILTER (
        ALLSELECTED ( 'Increment' ),
        'Increment'[Project Name] = SELECTEDVALUE ( 'Increment'[Project Name] )
            && 'Increment'[Date] = SELECTEDVALUE ( 'Dates'[Date] )
    )
)
Culmulative values = 
VAR _seldate =
    SELECTEDVALUE ( 'Dates'[Date] )
RETURN
    SUMX (
        FILTER ( ALLSELECTED ( 'Dates'[Date] ), 'Dates'[Date] <= _seldate ),
        [Sum of at risk amount]
    )

3. Create a matrix visual

yingyinr_1-1678440336735.png

Best Regards

Community Support Team _ Rena
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

5 REPLIES 5
v-yiruan-msft
Community Support
Community Support

Hi @aejohnson04 ,

How did you set your matrix visual? I create a matrix visual as below base on your provided sample data. It is different with yours...

yingyinr_0-1678329382576.pngIn order to get a better understanding on your requirement and give you a suitable solution for you, could you please provide some raw data in your table (exclude sensitive data) with Text format, your matrix visual settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Here is a link to my pbix file:

 

https://drive.google.com/file/d/1q1MWjXU8Ku5M_cOQVJp3hmy2O2hMTUHJ/view?usp=sharing

 

I am essentially trying to create a matrix (similiar to the one you showed in your second photo) that populates the blank values with the previous non blank value. The final matrix would reflect something similar to this:

 

Row LabelsPlant 1Plant 2Plant3Grand Total
3/23/2021 $             7,000.00 $                       -   $                 -   $             7,000.00
4/30/2021 $             7,000.00 $                   1.00 $                 -   $             7,001.00
11/23/2021 $          11,591.80 $                   1.00 $                 -   $          11,592.80
4/4/2022 $        184,591.80 $                   1.00 $                 -   $        184,592.80
3/1/2023 $  14,184,591.80 $                   1.00 $                 -   $  14,184,592.80
4/7/2023 $  14,184,591.80 $      173,001.00 $                 -   $  14,357,592.80
6/28/2023 $  14,184,591.80 $      885,001.00 $                 -   $  15,069,592.80
9/7/2023 $  14,449,183.60 $      885,001.00 $                 -   $  15,334,184.60
6/10/2024 $  14,449,183.60 $  3,090,001.00 $                 -   $  17,539,184.60
7/1/2024 $  14,449,183.60 $  3,090,001.00 $  20,000.00 $  17,559,184.60
7/2/2024 $  14,449,183.60 $  3,090,001.00 $  20,400.00 $  17,559,584.60
7/3/2024 $  14,449,183.60 $  3,090,001.00 $  26,400.00 $  17,565,584.60
7/4/2024 $  14,449,183.60 $  3,090,001.00 $  28,400.00 $  17,567,584.60
7/5/2024 $  14,449,183.60 $  3,090,001.00 $  29,100.00 $  17,568,284.60
7/6/2024 $  14,449,183.60 $  3,090,001.00 $  31,100.00 $  17,570,284.60

 

I believe the "running at risk" measure in the PBIX file will give me this result if I can figure out why "At risk all projects" measure is returning an extra column. You can ignore the "test" and "measure" measures. These are other tests I was trying to run to get the same solution. Thank you!

Hi @aejohnson04 ,

I updated your sample pbix file(see the attachment), please check if that is what you want.

1. Create a date dimension table, please DO NOT create any relationship with 'Increment' table

Dates = VALUES('Increment'[Date])

yingyinr_0-1678440195951.png

2. Create two measures as below to get the culmulative values

Sum of at risk amount = 
CALCULATE (
    SUM ( 'Increment'[Money At Risk] ),
    FILTER (
        ALLSELECTED ( 'Increment' ),
        'Increment'[Project Name] = SELECTEDVALUE ( 'Increment'[Project Name] )
            && 'Increment'[Date] = SELECTEDVALUE ( 'Dates'[Date] )
    )
)
Culmulative values = 
VAR _seldate =
    SELECTEDVALUE ( 'Dates'[Date] )
RETURN
    SUMX (
        FILTER ( ALLSELECTED ( 'Dates'[Date] ), 'Dates'[Date] <= _seldate ),
        [Sum of at risk amount]
    )

3. Create a matrix visual

yingyinr_1-1678440336735.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AMAZING! This worked. I've been trying to get this result for so long. Thank you!!!

Now one last question, why when I try to make a stacked area chart of the same information, it only shows the actual values of the dates (aka the original table)? Is there a way to show the stacked area chart with the same values as reflected in the matrix you helped to create? The stacked area chart I am getting is below, but I would like for it to show the cumulative values (aka, Plant 1 would continue at $14M for 2023/2024)

aejohnson04_0-1678474372517.png

 

Also, is there a way to add a totals column to the end which sums the populated values as shown in the matrix?

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.