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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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