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
Coelijoeli
New Member

Dax: Filter on true value

Hello community,

 

I have a question.

I'm building a dashboard to show how many blogs there have been delivered in the last month.

I used a excel workbook to import a table which contains information about the subject.

The table contains a column which describes if a blog has been deliverd to marketing or not

The values in this column are True and False.

 

Now what I want to do is sum the True Values to get a total of blogs that have been deliverd.

I tried the following Dax formule:

 

Total = COUNTAX(FILTER(Blogs;Blogs[Juni Ingeleverd]=1);Blogs[Juli Ingeleverd])+
COUNTAX(FILTER(Blogs;Blogs[Juli Ingeleverd]=1);Blogs[Juli Ingeleverd])+
COUNTAX(FILTER(Blogs;Blogs[Augustus Ingeleverd]=1);Blogs[Augustus Ingeleverd])+
COUNTAX(FILTER(Blogs;Blogs[September Ingeleverd]=1);Blogs[September])

 

This doesn't work though. I can't seem to find the right value to place in the filter or can't find the right Dax formule to peform this sum.

 

Does anyone have a idea of how I can solve this problem?

 

Thnx,

Joël

 

 

1 ACCEPTED SOLUTION

If I understand correct you have months in columns...This willmake it difficult to calculate & filter by month..First you need to unpivot the columns ( in query editor select all months columns & then 'Unpivot Columns' . End up with months (Juni Ingelvard , Juli Ingelvardin ) in Atrribute column and True or False in Value column..

 

BlogSent = CALCULATE( COUNTROWS ( Blog ) ; Blog[Value] = TRUE ) ..

 

Create the column chart with Attribute ( months ) as axis and BlogSend as values

Konstantinos Ioannou

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

If the values are truly "True" and "False" in your column, then you would need to use Blogs[Juni Ingelvard]="True".


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

If I understand correct you have months in columns...This willmake it difficult to calculate & filter by month..First you need to unpivot the columns ( in query editor select all months columns & then 'Unpivot Columns' . End up with months (Juni Ingelvard , Juli Ingelvardin ) in Atrribute column and True or False in Value column..

 

BlogSent = CALCULATE( COUNTROWS ( Blog ) ; Blog[Value] = TRUE ) ..

 

Create the column chart with Attribute ( months ) as axis and BlogSend as values

Konstantinos Ioannou

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.