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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
SophRow
Resolver II
Resolver II

Create new summary table

Hi,

 

I have a table of sites and various metrics, and I created a calculated column to define 'Query age'

 

SophRow_0-1669242944452.png

What I need is a new table that summarise query age > 1 months for each site, i.e.,

SophRow_1-1669243123109.png

Not sure how to do this as Query age is a calculated column!

 

Thanks,

Soph

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

try to create a new table with the code below:

Table =
ADDCOLUMNS(
    VALUES(TableName[Site]),
    ">1 month",
   CALCULATE(
        COUNTROWS(
            FILTER(
                TableName,
                TableName[Query age] <>"<1 month"
            )
        )
    )  
)
 
I tried and it works like this:
FreemanZ_0-1669254910937.png

 

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

to your Table visual, drag Site and this measure

Measure1 = calculate(countrows(Data),Data[Query Age]<>"<1 month")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
FreemanZ
Super User
Super User

try to create a new table with the code below:

Table =
ADDCOLUMNS(
    VALUES(TableName[Site]),
    ">1 month",
   CALCULATE(
        COUNTROWS(
            FILTER(
                TableName,
                TableName[Query age] <>"<1 month"
            )
        )
    )  
)
 
I tried and it works like this:
FreemanZ_0-1669254910937.png

 

Brilliant - thank you 🙂

 

@SophRow  You are welcome. Is it qualified as a solution to your question?

djurecicK2
Super User
Super User

@SophRow 

Something like this- modify to fit your table and field names.

 

CountMeasure= CALCULATE(COUNT(Tablename[Query age]), FILTER(Tablename, Tablename[New Calculated Column]= TRUE))

 

Please consider accepting as solution if this has answered the question.

djurecicK2
Super User
Super User

Hi @SophRow ,

 You could create another calculated colum that is true or false depending on if the query age is > 1 month. Then use that column to filter your count.

Thanks! I've created that column - can you share the DAX for the count?

(basically how i get to the second excel example in my first post)

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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