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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rrk92
Regular Visitor

Need to calculate total number of days posted by feed

My table has : Feed_pid , Job_id, Api_time

in matrix view

rows feed_pid

column : Api_time

values : distinctcount(job_id)

now i want to add one column to add beside feed_pid 

total_days: 

slicer : Api_time i converted to date 

i used total_days= calculate(distinctcount(Api_time) , filter(Api_time))

But in my matrix i want to place this total_days beside feed_pid I can't do it because it's a measure and if I place it in the values it is giving me 1 for each date but it should give total fixed value for that feed.

please try to help and

thanks for the support.

 

4 REPLIES 4
rrk92
Regular Visitor

but if I apply api slicer the total should come based on that api slicer?

now it's giving me complete total

but i need based on slicer selection

when i added api time in the allexcept it is giving me 1 for the total ?

Hi, @rrk92 

 

Can you provide some of the sample data and the output you expect? Please remove any sensitive data in advance.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Kedar_Pande
Community Champion
Community Champion

Create a Calculated Column:

Total_Days_Column = 
CALCULATE(
DISTINCTCOUNT('YourTable'[Api_time]),
ALLEXCEPT('YourTable', 'YourTable'[feed_pid])
)

Now, place this Total_Days_Column beside feed_pid in the Rows section of your matrix. This way, you’ll get a fixed distinct count of Api_time for each feed_pid.


If this helped, a Kudos 👍 or Solution mark would be great!🎉
Cheers,
Kedar Pande
Connect on LinkedIn

It's giving me total number 

but i have one api date slicer 

based on that api slicer total value should come, in the allexcept if i add api date it's giving me total as 1 

how to correct it?

Helpful resources

Announcements
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.