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
Hi all,
I have month, Quarter and year colum. If i select month want to see latest month like July 2017 in text box, If i select Year i want to see like Jan 2017 to July 2017 (we have ten year data) . finally if i select quarter want to see Jan 2017 - mar 2017 (First quarter) also would like to see by quarter wise in text box ..
anyone can help me on this?
Thanks.
Solved! Go to Solution.
@AmalrajRRD1 wrote:
Hi all,
I have month, Quarter and year colum. If i select month want to see latest month like July 2017 in text box, If i select Year i want to see like Jan 2017 to July 2017 (we have ten year data) . finally if i select quarter want to see Jan 2017 - mar 2017 (First quarter) also would like to see by quarter wise in text box ..
anyone can help me on this?
Thanks.
I'd suggest to use a calendar table, when you'd like to show data for 2017, then pick up 2017 in the slicer. when to show data for Q1 2017, pick up Q1 in 2017. May I know why you don't like this way?
As to your requirement, there's some tricky way with complicated measures, the measures values could vary according to the slicer like
value =
SWITCH (
LASTNONBLANK ( yourFilter[YMQ], "" ),
"Month", CALCULATE (
SUM ( yourTable[col] ),
FILTER (
yourTable,
yourTable[date] >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY ), 1 )
)
),
"Quarter", CALCULATE (
SUM ( yourTable[col] ),
FILTER (
yourTable,
yourTable[date] >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY ), 1 )
&& CALCULATE (
SUM ( yourTable[col] ),
FILTER (
yourTable,
yourTable[date]
< DATE ( YEAR ( TODAY () ), MONTH ( TODAY ) + 3, 1 )
)
)
)
),
"Year", CALCULATE (
SUM ( yourTable[col] ),
FILTER ( yourTable, yourTable[date] >= DATE ( YEAR ( TODAY () ), 1, 1 ) )
)
)
@AmalrajRRD1 wrote:
Hi all,
I have month, Quarter and year colum. If i select month want to see latest month like July 2017 in text box, If i select Year i want to see like Jan 2017 to July 2017 (we have ten year data) . finally if i select quarter want to see Jan 2017 - mar 2017 (First quarter) also would like to see by quarter wise in text box ..
anyone can help me on this?
Thanks.
I'd suggest to use a calendar table, when you'd like to show data for 2017, then pick up 2017 in the slicer. when to show data for Q1 2017, pick up Q1 in 2017. May I know why you don't like this way?
As to your requirement, there's some tricky way with complicated measures, the measures values could vary according to the slicer like
value =
SWITCH (
LASTNONBLANK ( yourFilter[YMQ], "" ),
"Month", CALCULATE (
SUM ( yourTable[col] ),
FILTER (
yourTable,
yourTable[date] >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY ), 1 )
)
),
"Quarter", CALCULATE (
SUM ( yourTable[col] ),
FILTER (
yourTable,
yourTable[date] >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY ), 1 )
&& CALCULATE (
SUM ( yourTable[col] ),
FILTER (
yourTable,
yourTable[date]
< DATE ( YEAR ( TODAY () ), MONTH ( TODAY ) + 3, 1 )
)
)
)
),
"Year", CALCULATE (
SUM ( yourTable[col] ),
FILTER ( yourTable, yourTable[date] >= DATE ( YEAR ( TODAY () ), 1, 1 ) )
)
)
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 63 | |
| 31 | |
| 30 | |
| 23 |