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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Chart with number boolean

Hi,

 

My dataset is a calendar of this kind :

 

For each date i have the year and boolean opendays

I would like to create a graph which count the number of open days by year like Excel :

excel.PNG

 

I create a measure but the result is not correct :

Number open=
CALCULATE(
    COUNTROWS(
            FILTER(Date_Calendrier;Date_Calendrier[Ouvrés]=TRUE()
                    )
            )
        )

screen.PNG

How can i resolve my problem ?

 

Thanks

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

Please share a sample of your data in a format that can be copied (paste it into the post from excel, not a screen shot) and include samples from each table involved.

 

Community Support Team _ Dina Ye
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-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

let me know if you'd like to get below result:

Add the measure: 

Measure = CALCULATE(DISTINCTCOUNT('Table'[date]),FILTER('Table',[Open]="TRUE"))

14.PNG

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

 

Hi  @v-diye-msft 

 

Thank you, that's ok in this case.

 

In my case, i have two data sets :

- date table with a status open or not for each day

- data table which n lines for each month of each year.

 

I created a link between both tables in using date field.

I would like to know number of open days of year select by second tables.

The measure shows the number of open days of keys select

 

The eadate.PNGsiest way is in adding a second date data set without link with data, but it's not correct for me to have two date calendars.

 

Ex Data table :

 

Thanks

Hi @Anonymous 

 

Please share a sample of your data in a format that can be copied (paste it into the post from excel, not a screen shot) and include samples from each table involved.

 

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

I modified my keys in both tables.

I concatenated month and year in chars and that's Ok now

 

Ths

Anonymous
Not applicable

I have problem to import my array :

date            year   Open
01/01/2018 2018 FALSE
02/01/2018 2018 TRUE
03/01/2018 2018 TRUE
04/01/2018 2018 TRUE
05/01/2018 2018 TRUE
06/01/2018 2018 TRUE
07/01/2018 2018 FALSE
08/01/2018 2018 TRUE
09/01/2018 2018 TRUE
10/01/2018 2018 TRUE
31/12/2018 2018 TRUE
01/01/2019 2019 FALSE
02/01/2019 2019 TRUE
03/01/2019 2019 TRUE
04/01/2019 2019 TRUE
05/01/2019 2019 TRUE
06/01/2019 2019 TRUE

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors