Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DAX

Hi All,

I'm trying to solve one User requirement in my power BI

I have a two tables 
one id Dim_Table and another is Fact_Table
In Dim table I have a column News and Content

In News I have Globe News, Locality News and Region News
and In content column there are differente contents under each News

In Fact_table I have views column

I have Related Dim_Table and Fact_Table with ID 

Here my requirement is:
whatever the content under each News type has highest views that content should be shown as Top View- Globe News for Globe News News type and same for Locality news and Region News
and whatever the content under each News type has lowest views that content should be shown as Low View- Globe News for Globe News News type and same for Locality news and Region News


Please help me

Thanks in advance

4 REPLIES 4
Anonymous
Not applicable

Hi  @Anonymous ,

Here are the steps you can follow:

1. Create calculated column.

Flag =
var _max=
MAXX(
    FILTER(ALL('Table'),
    'Table'[News]=EARLIER('Table'[News])),[Views])
var _min=
MINX(
    FILTER(ALL('Table'),
    'Table'[News]=EARLIER('Table'[News])),[Views])
return
IF(
    'Table'[Views]=_max,
    "Top View- Globe News for"&""&'Table'[News],
IF(
    [Views]=_min,
    "Low View- Globe News for"&""&'Table'[News]))

2. Result:

vyangliumsft_0-1686290296393.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

Hi,

I have "News" and "Content" Columns in Dim table and "Views" column in Fact table

I have given relationship between them using ID column

Can you please give me the solution as I have mentioned above

Thanks in advance

amitchandak
Super User
Super User

@Anonymous , You use TOPN and Windows for that

 

Learn Power BI: Dynamic TOPN using TOPN/Window and Numeric parameter: https://youtu.be/vm2mdEioQPQ

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit, Thanks for replying
That is not working as expected for mr , I'm sharing sample data with you

NewsContentViews
Globe NewsTesting is happening20
Globe NewsTesting is done16
Globe NewsInto Prod18
Locality NewsLocal Tag #Localality News 215
Locality NewsLocal Tag #Localality News 118
Region NewsTesting Region News #129
Region NewsTesting Region News #24
Region NewsTesting Region News #36


Here For Globe News I need to show only highest Content Views
In heer For Globe News Highest Content Views is 20
I need to show that Highest View Content only and also Views for that content
Same for Locality News and Region News

Please Help
Thanks in advance

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.