Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Is it possible to count a set of rows for a set of dates, then show that sum on a visual as the total on the last date(only last date showed) ?
For Example;
We have a table with 2 columns Date and Title:
DATE TITLE
1/1/2016 Charles Dickens
1/2/2017 William Shakespeare
1/3/2017 Numen Georges
I want to be able to have a visual that returns the sum as follows;
DATE SALES
1/3/2017 3
So in a bar chart or waterfall chart, I'll have a single bar with only one date and the sum of the counted rows up to that date.
Thanks for the help!
Solved! Go to Solution.
Hi @btalahmbong,
I reproduce your scenario using the sample data. Create two measures using the fomulas.
The last day = CALCULATE(MAX(Test[DATE]),ALL(Test)) SALES = CALCULATE(COUNTA(Test[TITLE]),FILTER(Test,Test[DATE]<=Test[The last day]))
Create a table visual, select two measures as value level, you will get the expected result as follows.
Thanks,
Angelia
Hi @btalahmbong,
I reproduce your scenario using the sample data. Create two measures using the fomulas.
The last day = CALCULATE(MAX(Test[DATE]),ALL(Test)) SALES = CALCULATE(COUNTA(Test[TITLE]),FILTER(Test,Test[DATE]<=Test[The last day]))
Create a table visual, select two measures as value level, you will get the expected result as follows.
Thanks,
Angelia
Create a couple measures like:
MaxDate = MAX(Table[DATE])
Total Count = RETURN CALCULATE(COUNTA(Table[TITLE]),FILTER(Table[DATE]<=[MaxDate]))
Then put Total Count in a Bar Chart and put a Card visual under it with MaxDate. That's the easiest way.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |