Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I have a question that is more related to the Tabular model and Excel connected to that model then Power BI but it's still viable in Power BI. My model is 3 tables: Date creation, Date resolution and issues (below)
ID | Created Date | Resolution Date| Resolution
1 |2019-09-01 | 2019-09-02 | Done
2 |2019-09-01 | |
3 |2019-09-01 | 2019-09-02 | Won't Fix
4 |2019-09-01 | |
The active relation is Date creation > Issue and Date resolution > Issue. There are two measures in Issue table
Issue created count:= COUNTROWS ( Issue )
Issue resolved count:= CALCULATE ( COUNTROWS ( Issue ); FILTER ( Issue; Issue[Resolution] <> BLANK () ) )
And now for the main question: Is there any way of showing values or blank depending on which calendar is chosen on rows/columns? What I need is when the user connects from Excel and chose Date resolution, the "Issue resolved count" should show values but "Issue created count" should show blank. Also when the user chose the Date creation, the "Issue resolved count" should show blank but "Issue created count" should show values. When no calendar is selected then both values should be shown.
-- DAX rule number 1: NEVER filter a table -- when you can filter a column. -- measure 1 (internal, hidden) [_IssuesCreated] = COUNTROWS ( Issue ) -- measure 2 (internal, hidden) [_IssuesResolved] = calculate( [_IssuesCreated], keepfilters ( not isblank( Issue[Resolution] ) ) ) -- measure 3 [Calendar Chosen] = var __creation = isfiltered( 'Creation Dates' ) var __resolution = isfiltered( 'Resolution Dates' ) var __both = __creation && __resolution return switch( true(), __both, "both", __creation, "creation", __resolution, "resolution", "none" ) -- measure 4 [Issues Resolved] = var __calendarChosen = [Calendar Chosen] var __value = [_IssuesResolved] return switch( true(), __calendarChosen in {"both", "creation"}, blank(), __calendarChosen in {"resolution", "none"}, __value, blank() // just in case but should not happen ) -- measure 5 [Issues Created] = var __calendarChosen = [Calendar Chosen] var __value = [_IssuesCreated] return switch( true(), __calendarChosen in {"both", "creation"}, __value, __calendarChosen in {"resolution", "none"}, blank(), blank() // just in case but should not happen )
Best
D.
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
18 | |
15 | |
7 | |
6 |