Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have attached the data. I need a sum of values for each date. For example,
1 Jan. 19: (1200+275-929-30-464+198+884) = 1134
I have also a slicer in the report So I can filter the values by P1, P2, P3....
Why, I'm doing this? I want to calculate the number of days where the total value is greater than 0.
Solved! Go to Solution.
hi, @vivekgupta84
no need of calculation
just drag your p-type to slicer and value column to card visual
when you select portfolio 1 then it show 1200
when you select portfolio 1 & 2 then it show 1475
Hi @lbendlin
Thanks for the response. Here is the dataset - https://docs.google.com/spreadsheets/d/1ONfzT9f_2jA5daZfztP9L1HSgOBsqX8g/edit?usp=sharing&ouid=10595...
I have attached a short dataset. The data has multiple years of data and around 10 P-type. The data has three columns P-type, Date and value.
I need a sum of value by date.
For example,
Portfolio 1 | 1-Jan-19 | 1200 |
Portfolio 2 | 1 -Jan-19 | 275 |
Portfolio 3 | 1-Jan-19 | -929 |
then the output for 1-Jan-19 is 546.
I want this output to be filtered by P-type. So, when I click Portfolio1 in the slicer it will show 1200 only and when I click Portfolio 1 and 2 then it will show 1475.
This is about the calculation.
------------------------------------------------------------------------------------------------------------------------------
I want to perform multiple calculations on this summarized output. Like monthly avg., daily avg., count of days where value is greater then 0, Highest and value in a day.
hi, @vivekgupta84
no need of calculation
just drag your p-type to slicer and value column to card visual
when you select portfolio 1 then it show 1200
when you select portfolio 1 & 2 then it show 1475
You don't need an explicit computation for that. Put the data in a matrix visual and Power BI will implicitly calculate it for you
Hi @lbendlin
Thanks for the response. I know that Power BI will calculate these implicitly in the matrix visual. But I need a Card visual to show the data.
For example, I have to calculate the count of dates where the value is greater than 0 "or" Maximum value for a date etc.
Hi
Please try this measure
hi, @vivekgupta84
below measure might work
Measure =
var a = SUMX(
FILTER(ALL('Table'[date],'Table'[value],'Table'[p type]),
'Table'[date]=MAX('Table'[date])
),
'Table'[value])
return
COUNTX(FILTER(SUMMARIZE('Table','Table'[date],"sd",a),[sd]>0),1)
Hi @Dangar332
It's not working. It is giving output 1229. I don't know what it is calculating.
Is there any option to create a calculated column for this? I also want to filter it using a P-type column.
Sounds good. What have you tried and where are you stuck? Did you try SUMMARIZECOLUMNS?
Hi @lbendlin,
I have tried multiple DAX functions. Yes, I have tried to summarize columns but was unable to get the expected output.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |