Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
in Power BI, i have 3 tables as below:
1) Company Code table
2) Calendar Table
3) Accounting Dcoument table
"Company Code" Table and "Accounting Dcoument" Table has a relationship with common column "Company Code" in both tables. there is no relationship between table "Calendar" and "Accounting Document". besides, there is a measure "selected_lastdayofYM" which is used to get the last day of current selected year month from Calendar Table( i put a slicer in the report, and it conbines to the column "Year-Month" of table "Calenar_Table")
in report page, i put a Table Visual and add some columns from table "Accounting Document" to it. the data in the Table Visual can be filtered by the slicer(company code from table "Company"), means that if i select any company in the slicer, the data in the table visual will be filtered based on the company that i selected in the slicer . see below screenshot.
the problem is that when i add the measure into the Table Visual . all the accounting document data will be showed in the Table Visual no matter which company value i selected in the slicer.
i don't understand why this happen, can anyone hep to explain the reason and how to avoid this to happen. thanks in advance.
Solved! Go to Solution.
Please try
Latest Year Month =
IF ( NOT ISEMPTY ( Accounting_Dcoument ), MAX ( Calendar_Table[Year_Month] ) )
Glad to help. If you find the proposed solution satisfactory, please consider marking it as acceptable solution.
Hi @tamerj1
it works as expect. the problem has been bothering me for a long time. thank you so much for your assistance. really appreciate !
Glad to help. If you find the proposed solution satisfactory, please consider marking it as acceptable solution.
Please try
Latest Year Month =
IF ( NOT ISEMPTY ( Accounting_Dcoument ), MAX ( Calendar_Table[Year_Month] ) )
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
10 | |
8 |