OscarValerock / Clockify-PowerBI

This repository contains the project for a Power BI Custom connector that connects to Clockify
MIT License
14 stars 5 forks source link

Issue with Refreshing Billable Hours in Power BI Service #19

Closed safer-lgtm closed 2 months ago

safer-lgtm commented 3 months ago

I created a small report considering Billable Hours, but after the refresh, although it was set to TRUE in Power BI Desktop, I get -1 and 0 instead after the refresh in Power BI Service. Any idea why this might be happening?

Here is how it looks in Power BI Desktop: grafik

Here is how it looks in Power BI Service: grafik

safer-lgtm commented 2 months ago

To resolve the issue of seeing -1 and 0 instead of TRUE and FALSE in Power BI Service, I created a calculated column to convert the values.

DAX Formula for Calculated Column:

Billable_Converted = SWITCH(
    TRUE(),
    'Table'[Billable] = -1, TRUE(),
    'Table'[Billable] = 0, FALSE(),
    'Table'[Billable] = TRUE, TRUE(),
    'Table'[Billable] = FALSE, FALSE(),
    BLANK()
)

Alternatively: Filtering in Power Query

  1. Open Power Query Editor.
  2. Select the Billable column.
  3. Add a filter to show only TRUE values.

However, I'm not entirely sure what caused the issue in the first place. It could be due to API discrepancies or some other reason.