Forum Discussion
Rank In PBI
Hi Aniya zhang,
Thanks for being patient and replying to my problem
| News Type | Content Title | Views |
| Global | team to lead Company through increasingly challenging external environment | 11,900 |
| Region | Competitors are coming | 4,596 |
| Region | Team at exhibition | 3,794 |
I just need to show this
only one top content title and it's respective view for each news type
but when i am adding created by name, published date dimension columns into the table
it's showing many values
I'll paste the dax i have used below
Top View = IF ( ISINSCOPE( 'Fact Content'[content_title] ), RANKX ( CALCULATETABLE ( VALUES ( 'Fact Content'[content_title] ), ALLSELECTED( ( 'Fact Content'[content_title] ), 'Fact Content'[Filtered News Type]) ), 'Fact Content'[Month Filter] ) )
the below is the output i am getting
But after adding created by name , published_at columns it's splitting down to many rows like below
Please helpp
It's very important for me
Thanks
sai
Hi , Anonymous
Thanks for your quick response! According to your screenshot and your dax code . The [Month Filter] measure seems to calculate the views in the previous month . And the [Top View] is used to filter the highest views in your table visual and it work good in your screenshot . And the issue is that when you put the other field like [Created By Name] or the [Published Date] , the table visual will not work.
For this, i think this not the reason for your [Top view] measure. Due to your Views is the previous month so you can not just directly put the other fields to the visual.I also test it in my side , but i still have no sample data as the same as yours so I can't completely guarantee that my situation is exactly the same as yours.
This is my test data and my understand now:
For this i use your two measures you provided and it work good in my side .If you want to add the [Created By Name] or the [Published Date], you may need to create measures to realize it:
Created Name Measure = CALCULATE( MAX('Fact Content'[created by name]) , MONTH('Fact Content'[date]) = MONTH(MAX('Fact Content'[date])) - 1)
Published Date Measure = CALCULATE( MAX('Fact Content'[published_at]) , MONTH('Fact Content'[date]) = MONTH(MAX('Fact Content'[date])) - 1)
Then we can get the right value due to it is from previous month so we can not just directly put it on the visual.
If this method still can not help you solve this case , can you just share me some sample data as the same as yours in a table format , and your end result you need also.Inconsistencies in data structures can complicate things very much, and [Filtered News Type] also appears in your DAX, I'm not sure what the relationship is to [News Type]?Hope this solution can help you!
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly