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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

I start month with 5 columns but in the end of the month one column does not exist in the rowset.

I have a PBI report which data source is MS Lists.

It is about auditing some criterias.

In the beggining of the month I have 5 columns ( PASSED, FAILED, INCONCLUSIVE, NOT APPLICABLE, NOT CHECKED).

 

But in the end of the month the column NOT CHECKED no longer exists as all audits have been checked.

Because of that I get a refresh error in PBI Service:

Data source error: The '<pii>NOT CHECKED</pii>' column does not exist in the rowset. Table: AuditsAll.

 

How can I avoid this?

 

It is my DAX formula:

RESULT =
IF (
    AuditsAll[PASSED] + AuditsAll[FAILED] + AuditsAll[INCONCLUSIVE] + AuditsAll[NOT APPLICABLE] = 0,
    "NOT AUDITED",
    IF (
        AuditsAll[FAILED] > 0,
        "FAILED",
        IF (
            AuditsAll[INCONCLUSIVE] > 0,
            "INCONCLUSIVE",
            IF ( AuditsAll[NOT CHECKED] > 0, "IN PROGRESS", "PASSED" )
        )
    )
)

 

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

I'm not very clear how your data source operates. When the NOT CHECKED column has no value, could you add a space " " or "null"?

 

Best Regards,
Community Support Team _ kalyj

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

rbriga
Impactful Individual
Impactful Individual

Try unpivoting the columns PASSED, FAILED, INCONCLUSIVE, NOT APPLICABLE, NOT CHECKED in Power Query.

Using = Table.UnpivotOtherColumns, should the NOT CHECKED column go missing, it won't cause a query error.

 

We'll call the number of audits for each "Value" and the field value (PASSED, FAILED,...) "Status" for now.

 

Now,

RESULT =
IF (
    CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] <> "NOT CHECKED")
             )= 0,
    "NOT AUDITED",
    IF (
        CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] = "FAILED")
             ) > 0,
        "FAILED",
        IF (
            CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] = "INCONCLUSIVE")
             ) > 0,
            "INCONCLUSIVE",
            IF ( CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] = "NOT CHECKED")
             ) > 0, "IN PROGRESS", "PASSED" )
        )
    )
)

Because "Not checked" is just another possible value of [Status], nothing would occour if it's missing.

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.