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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Matrix with Weekly Data Columns and String Values

I'm new to PowerBI and I'm trying to create the visualization below and am having trouble because of a few areas:

 

 

  

1. I am getting an error with dates because there are gaps in the dates I'm using due to them being weekly data.

2. I am having trouble re-formatting dates because PowerBI is putting in a long-winded full date ("Monday, January 1, 2018" instead of "01/01/2018")

3. I have not figured out how to do a countif using strings.

 

Any help or advice would be greatly appreciated.

 

Thanks!

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi  @Anonymous,

 

I'm assuming that you want to return Yes when measure is greater than target.

 

Use the following measure to add to your matrix:

 

YES / NO = 
IF (
    HASONEFILTER ( Data[Week Starting] );
    IF ( SUM ( Data[Measure] ) < SUM ( Data[Target] ); "No"; "Yes" );
    COUNTROWS (
        FILTER (
            SUMMARIZE (
                Data;
                Data[Week Starting];
                "YES/NO"; SUM ( Data[Measure] ) - SUM ( Data[Target] )
            );
            [YES/NO] > 0
        )
    )
)

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

Hi @Anonymous,

 

Select the date column then select the modeling on the bar and format the date as you need.

 

format.png

 

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi  @Anonymous,

 

I'm assuming that you want to return Yes when measure is greater than target.

 

Use the following measure to add to your matrix:

 

YES / NO = 
IF (
    HASONEFILTER ( Data[Week Starting] );
    IF ( SUM ( Data[Measure] ) < SUM ( Data[Target] ); "No"; "Yes" );
    COUNTROWS (
        FILTER (
            SUMMARIZE (
                Data;
                Data[Week Starting];
                "YES/NO"; SUM ( Data[Measure] ) - SUM ( Data[Target] )
            );
            [YES/NO] > 0
        )
    )
)

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Anonymous
Not applicable

Thanks Felix!! This is great! Any advice on how to adjust the format of the dates as columns?

 

Cheers,

 

Julian

Hi @Anonymous,

 

Select the date column then select the modeling on the bar and format the date as you need.

 

format.png

 

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.